Patch #2274 2007-12-09 22:50

pauliusz

Don't try to load non existing project
Download
2274-Don_t_try_to_l.patch (647 bytes)
Category
Application::Bugfix
Status
Accepted
Close date
2007-12-12 14:27
Assigned to
 
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp    (revision 4717)
+++ src/sdk/projectmanager.cpp    (working copy)
@@ -743,7 +743,8 @@
 cbProject* ProjectManager::LoadProject(const wxString& filename, bool activateIt)
 {
     cbProject* result = 0;
-    if (!BeginLoadingProject())
+
+    if (!wxFileExists(filename) || !BeginLoadingProject())
     {
         return 0;
     }
@@ -1390,9 +1391,9 @@
             Manager::Get()->GetPluginManager()->NotifyPlugins(event);
         }
     }
-    
+
     project->EndAddFiles();
-    
+
     return targets.GetCount();
 }
 
pauliusz 2007-12-09 22:54

This bug is very annoying if you are loading workspace with non existing project.

If you have renamed project directory then you will get messagebox stating that it couldn't save your project.

If you renamed just project file, then it will create empty project without any warnings...

Wrong behavior in both cases.

mandrav 2007-12-12 14:27

Applied, thanks :).