OSDN Git Service

Fix bugs of automatic detection for Kanji code of filenames.
[ffftp/ffftp.git] / local.c
diff --git a/local.c b/local.c
index 3988c6d..299ed0f 100644 (file)
--- a/local.c
+++ b/local.c
@@ -181,13 +181,21 @@ void DoLocalRENAME(char *Src, char *Dst)
 void DispFileProperty(char *Fname)\r
 {\r
        SHELLEXECUTEINFO sInfo;\r
 void DispFileProperty(char *Fname)\r
 {\r
        SHELLEXECUTEINFO sInfo;\r
+       // 異なるファイルが表示されるバグ修正\r
+       // UNCでない場合に末尾に半角スペースを置くと拡張子の補完がされなくなる\r
+       // 現在UNC対応の予定は無い\r
+       char Fname2[FMAX_PATH+1];\r
 \r
        memset(&sInfo, NUL, sizeof(SHELLEXECUTEINFO));\r
        sInfo.cbSize = sizeof(SHELLEXECUTEINFO);\r
        sInfo.fMask = SEE_MASK_INVOKEIDLIST;\r
        sInfo.hwnd = NULL;              //GetMainHwnd();\r
        sInfo.lpVerb = "Properties";\r
 \r
        memset(&sInfo, NUL, sizeof(SHELLEXECUTEINFO));\r
        sInfo.cbSize = sizeof(SHELLEXECUTEINFO);\r
        sInfo.fMask = SEE_MASK_INVOKEIDLIST;\r
        sInfo.hwnd = NULL;              //GetMainHwnd();\r
        sInfo.lpVerb = "Properties";\r
-       sInfo.lpFile = Fname;\r
+       // 異なるファイルが表示されるバグ修正\r
+//     sInfo.lpFile = Fname;\r
+       strcpy(Fname2, Fname);\r
+       strcat(Fname2, " ");\r
+       sInfo.lpFile = Fname2;\r
        sInfo.lpParameters = NULL;\r
        sInfo.lpDirectory = NULL;\r
        sInfo.nShow = SW_NORMAL;\r
        sInfo.lpParameters = NULL;\r
        sInfo.lpDirectory = NULL;\r
        sInfo.nShow = SW_NORMAL;\r