Don't suffix the configuration directory with the version on unix

Aegisub is not a library that needs to support having many versions
installed at once, and having multiple versions sharing a config
directory mostly works fine on Windows anyway.

Closes #1031.

Originally committed to SVN as r6234.
This commit is contained in:
Thomas Goyne 2012-01-08 01:34:49 +00:00
parent 43d4e785fb
commit 44bc249fe8

View file

@ -57,26 +57,12 @@ StandardPaths::StandardPaths() {
static_cast<wxStandardPaths&>(paths).SetInstallPrefix(wxT(INSTALL_PREFIX)); static_cast<wxStandardPaths&>(paths).SetInstallPrefix(wxT(INSTALL_PREFIX));
#endif #endif
// Get paths DoSetPathValue("?data", paths.GetDataDir());
#ifdef __WINDOWS__ DoSetPathValue("?user", paths.GetUserDataDir());
wxString dataDir = paths.GetDataDir(); DoSetPathValue("?temp", paths.GetTempDir());
wxString userDir = paths.GetUserDataDir();
#elif defined(__APPLE__)
wxString dataDir = paths.GetDataDir();
wxString userDir = paths.GetUserDataDir() + "-" + AEGISUB_VERSION_DATA;
#else
wxString dataDir = paths.GetDataDir() + "/" + AEGISUB_VERSION_DATA;
wxString userDir = paths.GetUserConfigDir() + "/.aegisub-" + AEGISUB_VERSION_DATA;
#endif
wxString tempDir = paths.GetTempDir();
// Set paths
DoSetPathValue("?data", dataDir);
DoSetPathValue("?user", userDir);
DoSetPathValue("?temp", tempDir);
// Create paths if they don't exist // Create paths if they don't exist
wxFileName folder(userDir + "/"); wxFileName folder(paths.GetUserDataDir() + "/");
if (!folder.DirExists()) folder.Mkdir(0777,wxPATH_MKDIR_FULL); if (!folder.DirExists()) folder.Mkdir(0777,wxPATH_MKDIR_FULL);
} }