mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Remove double slash in system temporary path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25442 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
979f5211a4
commit
81f63f6670
@ -375,7 +375,11 @@ FileName const get_temp_dir()
|
||||
// Typical example: C:/TEMP/.
|
||||
char path[MAX_PATH];
|
||||
GetTempPath(MAX_PATH, path);
|
||||
return FileName(to_utf8(from_local8bit(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);
|
||||
#else // Posix-like.
|
||||
return FileName("/tmp");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user