mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
createLyXTmpDir(): Don't hardcode /tmp, use package().system_temp_dir() insetad.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25212 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d2969c7dc9
commit
7f4247e718
@ -341,8 +341,8 @@ static FileName createTmpDir(FileName const & tempdir, string const & mask)
|
||||
|
||||
FileName const createLyXTmpDir(FileName const & deflt)
|
||||
{
|
||||
if (deflt.empty() || deflt.absFilename() == "/tmp")
|
||||
return createTmpDir(FileName("/tmp"), "lyx_tmpdir");
|
||||
if (deflt.empty() || deflt == package().system_temp_dir())
|
||||
return createTmpDir(package().system_temp_dir(), "lyx_tmpdir");
|
||||
|
||||
if (deflt.createDirectory(0777))
|
||||
return deflt;
|
||||
@ -354,7 +354,7 @@ FileName const createLyXTmpDir(FileName const & deflt)
|
||||
return createTmpDir(deflt, "lyx_tmpdir");
|
||||
} else {
|
||||
// some other error occured.
|
||||
return createTmpDir(FileName("/tmp"), "lyx_tmpdir");
|
||||
return createTmpDir(package().system_temp_dir(), "lyx_tmpdir");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user