svnno****@sourc*****
svnno****@sourc*****
2011年 4月 25日 (月) 15:00:31 JST
Revision: 4456 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4456 Author: doda Date: 2011-04-25 15:00:31 +0900 (Mon, 25 Apr 2011) Log Message: ----------- -d の引数の先頭が "\\ で始まる時は "// に置き換える。 UNC パス対応。非常にアドホックだけど。 Modified Paths: -------------- trunk/cygterm/cyglaunch.c -------------- next part -------------- Modified: trunk/cygterm/cyglaunch.c =================================================================== --- trunk/cygterm/cyglaunch.c 2011-04-19 16:07:21 UTC (rev 4455) +++ trunk/cygterm/cyglaunch.c 2011-04-25 06:00:31 UTC (rev 4456) @@ -95,6 +95,7 @@ char Temp[256], CygwinDir[256], Cmdline[256]; char *bs; int i; + BOOL d_opt=FALSE; if (GetModuleFileName(NULL, Temp, sizeof(Temp)) > 0 && (bs = strrchr(Temp, '\\')) != NULL) { @@ -117,7 +118,17 @@ if (i != 1) { strncat(Cmdline, " ", sizeof(Cmdline)-strlen(Cmdline)-1); } + if (d_opt && strncmp("\"\\\\", argv[i], 3) == 0) { + argv[i][1] = '/'; + argv[i][2] = '/'; + } strncat(Cmdline, argv[i], sizeof(Cmdline)-strlen(Cmdline)-1); + if (strcmp(argv[i], "-d") == 0) { + d_opt = TRUE; + } + else { + d_opt = FALSE; + } } //printf("%s\n", Cmdline);