changeset 635:6e479f33ea93

* Prepend working folder path to filename when showing files in explorer
author Sam Izzo <sam@humbug.net>
date Mon, 27 Aug 2012 02:10:06 +1000
parents 58ac1b197666
children 046ad99a4230
files src/mainwindow.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/mainwindow.cpp	Mon Aug 27 01:45:26 2012 +1000
+++ b/src/mainwindow.cpp	Mon Aug 27 02:10:06 2012 +1000
@@ -866,6 +866,12 @@
         // Although the Win32 API is quite happy to have
         // forward slashes as directory separators, Windows
         // Explorer is not
+        int last = m_workFolderPath.length() - 1;
+        char c = m_workFolderPath[last].toAscii();
+        if (c == '\\' || c == '/') {
+            m_workFolderPath.chop(1);
+        }
+        file = m_workFolderPath + "\\" + file;
         file = file.replace('/', '\\');
         args << "/select," << file;
         // FIXME: This shouldn't be using a hardcoded path.