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

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

commit 71577b7b0a4f57a34bf31a15fb52d32e926026e2
Author: krzys-h <krzy...@interia.pl>
Date:   Fri Oct 31 20:19:33 2014 +0100

    Fixed #335 and #348
---
 src/object/robotmain.cpp | 4 +++-
 src/ui/maindialog.cpp    | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp
index afdca9e..ad78e39 100644
--- a/src/object/robotmain.cpp
+++ b/src/object/robotmain.cpp
@@ -5390,9 +5390,9 @@ void CRobotMain::CompileScript(bool soluce)
                 if (brain->GetCompile(j)) continue;
 
                 std::string name = brain->GetScriptName(j);
-                name = "ai/"+name;
                 if (name[0] != 0)
                 {
+                    name = "ai/"+name;
                     if(! brain->ReadProgram(j, 
const_cast<char*>(name.c_str()))) {
                         CLogger::GetInstancePointer()->Error("Unable to read 
script from file \"%s\"\n", name.c_str());
                     }
@@ -5486,6 +5486,7 @@ void CRobotMain::LoadFileScript(CObject *obj, const char* 
filename, int objRank,
 
     
     std::string fnstr = filename;
+    boost::replace_all(fnstr, "\\", "/");
     boost::replace_all(fnstr, m_dialog->GetSavegameDir(), 
m_dialog->GetPHYSFSSavegameDir()); //TODO: Refactor to get physfs path here
     //TODO: Refactor to std::string
     char fn[MAX_FNAME];
@@ -5557,6 +5558,7 @@ void CRobotMain::SaveFileScript(CObject *obj, const char* 
filename, int objRank)
     if (type == OBJECT_HUMAN) return;
 
     std::string fnstr = filename;
+    boost::replace_all(fnstr, "\\", "/");
     boost::replace_all(fnstr, m_dialog->GetSavegameDir(), 
m_dialog->GetPHYSFSSavegameDir()); //TODO: Refactor to get physfs path here
     //TODO: Refactor to std::string
     char fn[MAX_FNAME];
diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp
index 21e2b74..32fa6e8 100644
--- a/src/ui/maindialog.cpp
+++ b/src/ui/maindialog.cpp
@@ -4166,6 +4166,7 @@ void CMainDialog::IOUpdateList()
         return;
 
     std::string filename = (m_saveList.at(sel) / 
"screen.png").make_preferred().string();
+    boost::replace_all(filename, "\\", "/");
     boost::replace_all(filename, GetSavegameDir(), GetPHYSFSSavegameDir()); 
//TODO: Refactor everything to PHYSFS, see issue #334
     filename = "../"+filename;
     if ( m_phase == PHASE_WRITE  || m_phase == PHASE_WRITEs )

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

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to