From cf710ffd9044154b80fc75dc3048dce36160f98a Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Thu, 21 Jun 2007 02:38:04 +0000 Subject: [PATCH] Path fixing for release builds. Originally committed to SVN as r1278. --- aegisub/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aegisub/main.cpp b/aegisub/main.cpp index a0536fca5..155abc5b0 100644 --- a/aegisub/main.cpp +++ b/aegisub/main.cpp @@ -162,13 +162,13 @@ void AegisubApp::OnUnhandledException() { // Attempt to recover file wxFileName origfile(AssFile::top->filename); wxString path = Options.AsText(_T("Auto recovery path")); - if (path.IsEmpty()) path = folderName; + if (path.IsEmpty()) path = StandardPaths::DecodePath(_T("?user/")); wxFileName dstpath(path); - if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path; + if (!dstpath.IsAbsolute()) path = StandardPaths::DecodePath(_T("?user/")) + path; path += _T("/"); dstpath.Assign(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); // Inform user of crash @@ -182,9 +182,9 @@ void AegisubApp::OnFatalException() { // Attempt to recover file wxFileName origfile(AssFile::top->filename); wxString path = Options.AsText(_T("Auto recovery path")); - if (path.IsEmpty()) path = folderName; + if (path.IsEmpty()) path = StandardPaths::DecodePath(_T("?user/")); wxFileName dstpath(path); - if (!dstpath.IsAbsolute()) path = AegisubApp::folderName + path; + if (!dstpath.IsAbsolute()) path = StandardPaths::DecodePath(_T("?user/")) + path; path += _T("/"); dstpath.Assign(path); if (!dstpath.DirExists()) wxMkdir(path);