mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 18:43:37 +00:00
Hopefully fix http://bugzilla.lyx.org/show_bug.cgi?id=4918
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25207 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5e6a1a3da8
commit
430296f4af
@ -846,7 +846,7 @@ bool LyX::init()
|
|||||||
if (document_path.exists() && document_path.isDirectory())
|
if (document_path.exists() && document_path.isDirectory())
|
||||||
package().document_dir() = document_path;
|
package().document_dir() = document_path;
|
||||||
|
|
||||||
package().temp_dir() = createLyXTmpDir(FileName(lyxrc.tempdir_path));
|
package().set_temp_dir(createLyXTmpDir(FileName(lyxrc.tempdir_path)));
|
||||||
if (package().temp_dir().empty()) {
|
if (package().temp_dir().empty()) {
|
||||||
Alert::error(_("Could not create temporary directory"),
|
Alert::error(_("Could not create temporary directory"),
|
||||||
bformat(_("Could not create a temporary directory in\n"
|
bformat(_("Could not create a temporary directory in\n"
|
||||||
|
@ -162,6 +162,15 @@ Package::Package(string const & command_line_arg0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Package::set_temp_dir(FileName const & temp_dir) const
|
||||||
|
{
|
||||||
|
if (temp_dir.empty())
|
||||||
|
temp_dir_ = system_temp_dir_;
|
||||||
|
else
|
||||||
|
temp_dir_ = temp_dir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// These next functions contain the stuff that is substituted at
|
// These next functions contain the stuff that is substituted at
|
||||||
|
@ -116,7 +116,10 @@ public:
|
|||||||
* (Eg /tmp/lyx_tmpdir800nBI1z9 on *nix.)
|
* (Eg /tmp/lyx_tmpdir800nBI1z9 on *nix.)
|
||||||
* Can be reset by LyXRC.
|
* Can be reset by LyXRC.
|
||||||
*/
|
*/
|
||||||
FileName & temp_dir() const { return temp_dir_; }
|
//@{
|
||||||
|
FileName const & temp_dir() const { return temp_dir_; }
|
||||||
|
void set_temp_dir(FileName const & temp_dir) const;
|
||||||
|
//@}
|
||||||
|
|
||||||
/** Used when setting the user_support directory.
|
/** Used when setting the user_support directory.
|
||||||
* Used also when expanding "~/" or contracting to "~/". (filetools.cpp)
|
* Used also when expanding "~/" or contracting to "~/". (filetools.cpp)
|
||||||
|
Loading…
Reference in New Issue
Block a user