View Full Version : Launching editor in windows

09-03-2008, 12:34 PM
I installed novashell in c:\program files\novashell
When I click edit to launch the editor to open a script file(for example: test.lua, my text editor(pspad) open "c:\program files\test.lua" instead of "c:\program files\novashell\myworld\scripts\test.lua" . I think pspad(and some other editors) is not happy with a path with mixed seperators(c:\program files\novashell/base). After I try to replace all \ with / ( std::replace(file.begin(),file.end(),'\\','/'); ). It works fine.

Here's the my patch:

Index: EntEditor.cpp
================================================== =================
--- EntEditor.cpp (revision 370)
+++ EntEditor.cpp (working copy)
@@ -10,8 +10,8 @@
#include "Console.h"
#include "AI/WorldNavManager.h"
#include "DataEditor.h"
+#include <algorithm>

#ifdef __APPLE__
#include <Carbon/Carbon.h>
@@ -577,7 +577,7 @@
//prepend the full path
file = CL_Directory::get_current() + "/"+file;
+ std::replace(file.begin(),file.end(),'\\','/');
open_file(GetApp()->GetHWND(), file.c_str());
#elif __APPLE__

09-04-2008, 12:56 AM
Hey great, thanks... I tried to apply this but got some errors, I could do it manually but I'd like to sort out this process.

Did you use TortioseSVN's create patch method? (recommended) That's supposed to make a svn universal diff.

Or maybe formatting screwed up a line or two, maybe attach as file?

09-04-2008, 04:47 AM
Yes, it's TortioseSVN.

The patch is attached.

09-04-2008, 05:09 AM
Thanks, patch applied.