Revert "Change default working directory from ~/ to ".""

Setting the default working directory to '.' is an invasive change
on Mac and Windows, where the current working directory of LyX when
LyX is started from the GUI is not a reasonable choice for the
default directory in e.g. the "save as" file dialog or the "open"
dialog. A similar situation could happen on Linux distributions (I'm
not aware of any, e.g., POSIX standard that defines that the working
directory of a binary started from GUI should be the home
directory). Thus, it is not clear this default is good on any
platform.

If the user wishes to have the behavior of '.', the description in
the "paths" preferences pane provides the information for making the
change.

For more information, see the discussion at:

  https://www.mail-archive.com/search?l=mid&q=635298DE-5028-4BB1-8D8F-A634BA68C420%40gmx.net

This reverts commit 892593fbdc.
This commit is contained in:
Scott Kostyshak 2017-05-09 07:43:17 -04:00
parent faea3bdb95
commit 638020ab10
2 changed files with 1 additions and 7 deletions

View File

@ -60,12 +60,6 @@
!!!The following pref variables were changed in 2.3:
* \document_path
Default is changed to ".". The best guess for where the user wants to save
or find files is the directory the user started LyX from. Before, the
default was always the home directory. If desired, the old behavior can be
restored by changing the default path in Preferences > "Working directory".
!!!The following pref variables are obsoleted in 2.3:

View File

@ -865,7 +865,7 @@ bool LyX::init()
#endif
lyxrc.tempdir_path = package().temp_dir().absFileName();
lyxrc.document_path = ".";
lyxrc.document_path = package().document_dir().absFileName();
if (lyxrc.example_path.empty()) {
lyxrc.example_path = addPath(package().system_support().absFileName(),