From 15671ce1d9591a6f6f84176a412ed8c3809b2335 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 22 Sep 2014 12:03:50 -0700 Subject: [PATCH] remove trailing slash from filenames before adding, because getting basename on OSX fails otherwise --- onionshare_gui/file_selection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onionshare_gui/file_selection.py b/onionshare_gui/file_selection.py index d5c21dca..4a5bfeb8 100644 --- a/onionshare_gui/file_selection.py +++ b/onionshare_gui/file_selection.py @@ -108,7 +108,7 @@ class FileList(QtGui.QListWidget): self.filenames.append(filename) fileinfo = QtCore.QFileInfo(filename) - basename = os.path.basename(filename) + basename = os.path.basename(filename.rstrip('/')) ip = QtGui.QFileIconProvider() icon = ip.icon(fileinfo)