Fix for issue 1029: Debugger opens files with ^O, but crashes when opening files...
authorjvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 5 Feb 2013 19:44:07 +0000 (19:44 +0000)
committerjvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Tue, 5 Feb 2013 19:44:07 +0000 (19:44 +0000)
Don't append leading '/' if path is local

git-svn-id: http://skia.googlecode.com/svn/trunk@7593 2bbb7eff-a529-9590-31e7-b0007b416f81

debugger/QT/SkDebuggerGUI.cpp

index a64ec9b..6005944 100644 (file)
@@ -579,7 +579,10 @@ void SkDebuggerGUI::saveToFile(const SkString& filename) {
 void SkDebuggerGUI::loadFile(QListWidgetItem *item) {
     if (fDirectoryWidgetActive) {
         fFileName = fPath.toAscii().data();
-        fFileName.append("/");
+        // don't add a '/' to files in the local directory
+        if (fFileName.size() > 0) {
+            fFileName.append("/");
+        }
         fFileName.append(item->text().toAscii().data());
         loadPicture(fFileName);
     }