mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
please JMarc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25444 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
551f32859d
commit
788893bdea
@ -375,11 +375,8 @@ FileName const get_temp_dir()
|
||||
// Typical example: C:/TEMP/.
|
||||
char path[MAX_PATH];
|
||||
GetTempPath(MAX_PATH, path);
|
||||
string tmp = to_utf8(from_local8bit(path));
|
||||
size_t const size = tmp.size();
|
||||
if (size && (tmp[size - 1] == '/' || tmp[size - 1] == '\\'))
|
||||
tmp.erase(size - 1, 1);
|
||||
return FileName(tmp);
|
||||
// Remove trailing backslash if any.
|
||||
return FileName(rtrim(to_utf8(from_local8bit(path)), "\\"));
|
||||
#else // Posix-like.
|
||||
return FileName("/tmp");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user