Fixed autosaving of some file types.

Originally committed to SVN as r1090.
This commit is contained in:
Rodrigo Braz Monteiro 2007-04-18 01:59:50 +00:00
parent e6331a182a
commit 870d249123

View file

@ -1351,7 +1351,7 @@ void FrameMain::OnOpenStylingAssistant (wxCommandEvent &event) {
void FrameMain::OnAutoSave(wxTimerEvent &event) { void FrameMain::OnAutoSave(wxTimerEvent &event) {
// Auto Save // Auto Save
try { try {
if (AssFile::top->loaded && AssFile::top->CanSave()) { if (AssFile::top->loaded) {
// Set path // Set path
wxFileName origfile(AssFile::top->filename); wxFileName origfile(AssFile::top->filename);
wxString path = Options.AsText(_T("Auto save path")); wxString path = Options.AsText(_T("Auto save path"));
@ -1363,7 +1363,7 @@ void FrameMain::OnAutoSave(wxTimerEvent &event) {
if (!dstpath.DirExists()) wxMkdir(path); if (!dstpath.DirExists()) wxMkdir(path);
// Save // Save
wxString backup = path + origfile.GetName() + _T(".AUTOSAVE.") + origfile.GetExt(); wxString backup = path + origfile.GetName() + _T(".AUTOSAVE.ass");
AssFile::top->Save(backup,false,false); AssFile::top->Save(backup,false,false);
// Set status bar // Set status bar