Fix handling of autosave and autobackup paths that don't end in a slash
Originally committed to SVN as r6386.
This commit is contained in:
parent
e258e8c25f
commit
049c730813
1 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ void AssFile::Load(const wxString &_filename,wxString charset,bool addToRecent)
|
||||||
if (file.FileExists()) {
|
if (file.FileExists()) {
|
||||||
wxString path = lagi_wxString(OPT_GET("Path/Auto/Backup")->GetString());
|
wxString path = lagi_wxString(OPT_GET("Path/Auto/Backup")->GetString());
|
||||||
if (path.empty()) path = file.GetPath();
|
if (path.empty()) path = file.GetPath();
|
||||||
wxFileName dstpath(StandardPaths::DecodePath(path));
|
wxFileName dstpath(StandardPaths::DecodePath(path + "/"));
|
||||||
if (!dstpath.DirExists())
|
if (!dstpath.DirExists())
|
||||||
wxMkdir(dstpath.GetPath());
|
wxMkdir(dstpath.GetPath());
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ wxString AssFile::AutoSave() {
|
||||||
wxString path = lagi_wxString(OPT_GET("Path/Auto/Save")->GetString());
|
wxString path = lagi_wxString(OPT_GET("Path/Auto/Save")->GetString());
|
||||||
if (!path)
|
if (!path)
|
||||||
path = origfile.GetPath();
|
path = origfile.GetPath();
|
||||||
path = StandardPaths::DecodePath(path);
|
path = StandardPaths::DecodePath(path + "/");
|
||||||
|
|
||||||
wxFileName dstpath(path);
|
wxFileName dstpath(path);
|
||||||
if (!dstpath.DirExists())
|
if (!dstpath.DirExists())
|
||||||
|
|
Loading…
Reference in a new issue