void env_SetTempPath(const String& path)
{
- strTempPath = paths_AddTrailingSlash(path);
+ strTempPath = paths_AddTrailingSlash(paths_GetLongPath(path));
paths_CreateIfNeeded(strTempPath);
}
UpdateResources();
}
+ // Set new temporary path
+ theApp.SetupTempPath();
+
// Set new filterpath
String filterPath = GetOptionsMgr()->GetString(OPT_FILTER_USERPATH);
theApp.m_pGlobalFileFilter->SetUserFilterPath(filterPath);
OptionsInit(); // Implementation in OptionsInit.cpp
// Initialize temp folder
- String instTemp = env_GetPerInstanceString(TempFolderPrefix);
- if (GetOptionsMgr()->GetBool(OPT_USE_SYSTEM_TEMP_PATH))
- env_SetTempPath(paths_ConcatPath(env_GetSystemTempPath(), instTemp));
- else
- env_SetTempPath(paths_ConcatPath(GetOptionsMgr()->GetString(OPT_CUSTOM_TEMP_PATH), instTemp));
+ SetupTempPath();
// Cleanup left over tempfiles from previous instances.
// Normally this should not neet to do anything - but if for some reason
}
}
+void CMergeApp::SetupTempPath()
+{
+ String instTemp = env_GetPerInstanceString(TempFolderPrefix);
+ if (GetOptionsMgr()->GetBool(OPT_USE_SYSTEM_TEMP_PATH))
+ env_SetTempPath(paths_ConcatPath(env_GetSystemTempPath(), instTemp));
+ else
+ env_SetTempPath(paths_ConcatPath(GetOptionsMgr()->GetString(OPT_CUSTOM_TEMP_PATH), instTemp));
+}
+
/**
* @brief Handles menu selection from recent projects list
* @param [in] nID Menu ID of the selected item
BOOL SyncFileToVCS(const String& pszDest, BOOL &bApplyToAll, String& psError);
bool GetMergingMode() const;
void SetMergingMode(bool bMergingMode);
+ void SetupTempPath();
// Implementation
protected: