Fix for issue 1029: Debugger opens files with ^O, but crashes when opening files through other methods
Don't append leading '/' if path is local
git-svn-id: http://skia.googlecode.com/svn/trunk@7593 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index a64ec9b..6005944 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -579,7 +579,10 @@
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);
}