Lars Gullik Bjønnes wrote:
> | Second (and very minor), I noticed that on a clean installation, the
> | LyX user's directory is ~/Library/Application\ Support/lyx; it should
> | be ~/Library/Application\ Support/LyX -- both for consistency with
> | 1.3.6 and to conform to Mac conventions for naming application
> | support folders.
>
> This I wont touch. (i.e. I leave it for somebody else)
Ok, looks like some things fell between the cracks. The attached pair of
patches sync the two LyX versions. I'll commit both as they're obviously
correct.
--
Angus
Index: src/support/package.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/Attic/package.C,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 package.C
--- src/support/package.C 2 Oct 2005 21:49:52 -0000 1.1.2.8
+++ src/support/package.C 10 Oct 2005 21:41:47 -0000
@@ -279,7 +279,7 @@ string const get_temp_dir()
{
#if defined (USE_WINDOWS_PACKAGING)
// Typical example: C:/TEMP/.
- char path[PATH_MAX + 1];
+ char path[PATH_MAX];
GetTempPath(PATH_MAX, path);
return os::internal_path(path);
#else // Posix-like.
@@ -543,8 +543,8 @@ get_user_support_dir(string const & defa
}
-// $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)
Index: src/support/package.C.in
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/package.C.in,v
retrieving revision 1.14
diff -u -p -r1.14 package.C.in
--- src/support/package.C.in 2 Oct 2005 21:48:00 -0000 1.14
+++ src/support/package.C.in 10 Oct 2005 21:40:23 -0000
@@ -584,15 +584,16 @@ get_user_support_dir(string const & defa
}
-// $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_di
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);