forked from mia/Aegisub
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()) {
|
||||
wxString path = lagi_wxString(OPT_GET("Path/Auto/Backup")->GetString());
|
||||
if (path.empty()) path = file.GetPath();
|
||||
wxFileName dstpath(StandardPaths::DecodePath(path));
|
||||
wxFileName dstpath(StandardPaths::DecodePath(path + "/"));
|
||||
if (!dstpath.DirExists())
|
||||
wxMkdir(dstpath.GetPath());
|
||||
|
||||
|
@ -182,7 +182,7 @@ wxString AssFile::AutoSave() {
|
|||
wxString path = lagi_wxString(OPT_GET("Path/Auto/Save")->GetString());
|
||||
if (!path)
|
||||
path = origfile.GetPath();
|
||||
path = StandardPaths::DecodePath(path);
|
||||
path = StandardPaths::DecodePath(path + "/");
|
||||
|
||||
wxFileName dstpath(path);
|
||||
if (!dstpath.DirExists())
|
||||
|
|
Loading…
Reference in a new issue