[colobot] 92/390: Fixed program saving

Didier Raboud odyx at moszumanska.debian.org
Fri Jun 12 14:21:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch upstream/latest
in repository colobot.

commit 83abb8ca8e74176d64944e9681d74aa11ef6cdf9
Author: krzys-h <krzys_h at interia.pl>
Date:   Sun Oct 19 13:18:31 2014 +0200

    Fixed program saving
---
 src/ui/maindialog.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp
index 482d00b..7d1da0a 100644
--- a/src/ui/maindialog.cpp
+++ b/src/ui/maindialog.cpp
@@ -3527,7 +3527,7 @@ void CMainDialog::NameCreate()
     char        c;
     int         len, i, j;
 
-    GetLogger()->Debug("Creating new player\n");
+    GetLogger()->Info("Creating new player\n");
     pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW5));
     if ( pw == 0 )  return;
     pe = static_cast<CEdit*>(pw->SearchControl(EVENT_INTERFACE_NEDIT));
@@ -3564,13 +3564,16 @@ void CMainDialog::NameCreate()
         return;
     }
 
-    // TODO: _mkdir(m_savegameDir);  // if does not exist yet!
-
 
+    if(!CResourceManager::DirectoryExists(m_savegameDir))
+        CResourceManager::CreateDirectory(m_savegameDir);
+    
     dir = m_savegameDir + "/" + name;
     if (!fs::exists(dir))
     {
         fs::create_directories(dir);
+        if(!CResourceManager::DirectoryExists(dir))
+            CResourceManager::CreateDirectory(dir);
     }
     else
     {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list