OSDN Git Service

Avoid conflicting folder name in TEMP folder
authorsdottaka <none@none>
Tue, 12 Feb 2013 03:58:01 +0000 (19:58 -0800)
committersdottaka <none@none>
Tue, 12 Feb 2013 03:58:01 +0000 (19:58 -0800)
Src/Constants.h
Src/Environment.cpp
Src/Merge.cpp

index 1ec0499..c175490 100644 (file)
@@ -57,7 +57,7 @@ const TCHAR ExecutableFilename[] = _T("WinMerge.exe");
 const TCHAR ExecutableFilenameU[] = _T("WinMergeU.exe");
 
 /** @brief Temp folder name prefix for WinMerge temp folders. */
-const TCHAR TempFolderPrefix[] = _T("WM_");
+const TCHAR TempFolderPrefix[] = _T("WinMerge_TEMP_");
 
 /**
  * @brief Flags used when opening files
index da779ce..0ebf367 100644 (file)
@@ -50,8 +50,6 @@ String env_GetTempPath()
                if (strTempPath.empty())
                        return strTempPath;
 
-               strTempPath = paths_ConcatPath(strTempPath, env_GetPerInstanceString(_T("WM_")));
-
                paths_CreateIfNeeded(strTempPath);
        }
        return strTempPath;
index fc45e84..9c909ad 100644 (file)
@@ -301,7 +301,7 @@ BOOL CMergeApp::InitInstance()
        OptionsInit(); // Implementation in OptionsInit.cpp
 
        // Initialize temp folder
-       String instTemp = env_GetPerInstanceString(_T("WM_"));
+       String instTemp = env_GetPerInstanceString(TempFolderPrefix);
        if (GetOptionsMgr()->GetBool(OPT_USE_SYSTEM_TEMP_PATH))
                env_SetTempPath(paths_ConcatPath(env_GetSystemTempPath(), instTemp));
        else