mirror of https://github.com/odrling/Aegisub
Path fixing for release builds.
Originally committed to SVN as r1278.
This commit is contained in:
parent
d0fc49ca67
commit
cf710ffd90
|
@ -162,13 +162,13 @@ void AegisubApp::OnUnhandledException() {
|
||||||
// Attempt to recover file
|
// Attempt to recover file
|
||||||
wxFileName origfile(AssFile::top->filename);
|
wxFileName origfile(AssFile::top->filename);
|
||||||
wxString path = Options.AsText(_T("Auto recovery path"));
|
wxString path = Options.AsText(_T("Auto recovery path"));
|
||||||
if (path.IsEmpty()) path = folderName;
|
if (path.IsEmpty()) path = StandardPaths::DecodePath(_T("?user/"));
|
||||||
wxFileName dstpath(path);
|
wxFileName dstpath(path);
|
||||||
if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path;
|
if (!dstpath.IsAbsolute()) path = StandardPaths::DecodePath(_T("?user/")) + path;
|
||||||
path += _T("/");
|
path += _T("/");
|
||||||
dstpath.Assign(path);
|
dstpath.Assign(path);
|
||||||
if (!dstpath.DirExists()) wxMkdir(path);
|
if (!dstpath.DirExists()) wxMkdir(path);
|
||||||
wxString filename = folderName + origfile.GetName() + _T(".RECOVER.ass");
|
wxString filename = StandardPaths::DecodePath(_T("?user/")) + origfile.GetName() + _T(".RECOVER.ass");
|
||||||
AssFile::top->Save(filename,false,false);
|
AssFile::top->Save(filename,false,false);
|
||||||
|
|
||||||
// Inform user of crash
|
// Inform user of crash
|
||||||
|
@ -182,9 +182,9 @@ void AegisubApp::OnFatalException() {
|
||||||
// Attempt to recover file
|
// Attempt to recover file
|
||||||
wxFileName origfile(AssFile::top->filename);
|
wxFileName origfile(AssFile::top->filename);
|
||||||
wxString path = Options.AsText(_T("Auto recovery path"));
|
wxString path = Options.AsText(_T("Auto recovery path"));
|
||||||
if (path.IsEmpty()) path = folderName;
|
if (path.IsEmpty()) path = StandardPaths::DecodePath(_T("?user/"));
|
||||||
wxFileName dstpath(path);
|
wxFileName dstpath(path);
|
||||||
if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path;
|
if (!dstpath.IsAbsolute()) path = StandardPaths::DecodePath(_T("?user/")) + path;
|
||||||
path += _T("/");
|
path += _T("/");
|
||||||
dstpath.Assign(path);
|
dstpath.Assign(path);
|
||||||
if (!dstpath.DirExists()) wxMkdir(path);
|
if (!dstpath.DirExists()) wxMkdir(path);
|
||||||
|
|
Loading…
Reference in New Issue