From 0ac6f168f15393a3213c1c95f8adc4434132dcb2 Mon Sep 17 00:00:00 2001 From: "jvanverth@google.com" Date: Tue, 5 Feb 2013 19:44:07 +0000 Subject: [PATCH] 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 --- debugger/QT/SkDebuggerGUI.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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::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); } -- 2.7.4