please JMarc

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25444 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-07-04 13:14:20 +00:00
parent 551f32859d
commit 788893bdea

View File

@ -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