[rkward-cvs] SF.net SVN: rkward:[2566] trunk/rkward/rkward/windows/rkcommandeditorwindow .cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Jul 20 17:53:15 UTC 2009
Revision: 2566
http://rkward.svn.sourceforge.net/rkward/?rev=2566&view=rev
Author: tfry
Date: 2009-07-20 17:53:15 +0000 (Mon, 20 Jul 2009)
Log Message:
-----------
Work around the setWDToScript issue reported by nono.231 (untested)
Modified Paths:
--------------
trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2009-07-02 08:49:17 UTC (rev 2565)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp 2009-07-20 17:53:15 UTC (rev 2566)
@@ -446,7 +446,12 @@
RK_TRACE (COMMANDEDITOR);
RK_ASSERT (!url ().isEmpty ());
- RKConsole::pipeUserCommand (new RCommand ("setwd (\"" + url ().directory () + "\")", RCommand::User, i18n ("cd to current script directory")));
+ QString dir = url.directory ();
+#ifdef Q_OS_WIN
+ // KURL::directory () returns a leading slash on windows as of KDElibs 4.3
+ while (dir.startsWith ('/')) dir.remove (0, 1);
+#endif
+ RKConsole::pipeUserCommand (new RCommand ("setwd (\"" + dir + "\")", RCommand::User, i18n ("cd to current script directory")));
}
void RKCommandEditorWindow::runSelection() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list