]> git.lyx.org Git - lyx.git/commitdiff
Sync with LyX 1.3.x.
authorAngus Leeming <leeming@lyx.org>
Mon, 10 Oct 2005 21:54:38 +0000 (21:54 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 10 Oct 2005 21:54:38 +0000 (21:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10536 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/package.C.in

index c055ce541fe2553331767f016bbeb99baa08df21..1ddcb1f4a45d7460a22be9ef9f2f845be1eca439 100644 (file)
@@ -584,15 +584,16 @@ get_user_support_dir(string const & default_user_support_dir,
 }
 
 
-// $HOME/.lyx on all platforms but Win32 where it will be something like
-// "C:/Documents and Settings/USERNAME/Application Data/lyx"
+// $HOME/.lyx on POSIX but on Win32 it will be something like
+// "C:/Documents and Settings/USERNAME/Application Data/LyX"
 string const get_default_user_support_dir(string const & home_dir)
 {
 #if defined (USE_WINDOWS_PACKAGING)
        (void)home_dir; // Silence warning about unused variable.
 
+       string const user_dir = (string(PACKAGE) == "lyx") ? "LyX" : PACKAGE;
        os::GetFolderPath win32_folder_path;
-       return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), PACKAGE);
+       return AddPath(win32_folder_path(os::GetFolderPath::APPDATA), user_dir);
 
 #elif defined (USE_MACOSX_PACKAGING)
        (void)home_dir; // Silence warning about unused variable.
@@ -611,7 +612,8 @@ string const get_default_user_support_dir(string const & home_dir)
        if (status_code != 0)
                return string();
 
-       return AddPath(reinterpret_cast<char const *>(store), PACKAGE);
+       string const user_dir = (string(PACKAGE) == "lyx") ? "LyX" : PACKAGE;
+       return AddPath(reinterpret_cast<char const *>(store), user_dir);
 
 #else // USE_POSIX_PACKAGING
        return AddPath(home_dir, string(".") + PACKAGE);