diff --git a/onionshare/common.py b/onionshare/common.py
index 79d62ca9..9703e0f5 100644
--- a/onionshare/common.py
+++ b/onionshare/common.py
@@ -57,7 +57,7 @@ def get_platform():
"""
Returns the platform OnionShare is running on.
"""
- plat = platform.system()
+ plat = platform.system()
if re.match('^.*BSD$', plat):
plat = 'BSD'
return plat
@@ -69,6 +69,10 @@ def get_resource_path(filename):
"""
p = get_platform()
+ # On Windows, and in Windows dev mode, switch slashes in incoming filename to backslackes
+ if p == 'Windows':
+ filename = filename.replace('/', '\\')
+
if getattr(sys, 'onionshare_dev_mode', False):
# Look for resources directory relative to python file
prefix = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'share')
diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py
index 56a1967b..5c05ae18 100644
--- a/onionshare_gui/onionshare_gui.py
+++ b/onionshare_gui/onionshare_gui.py
@@ -684,7 +684,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.info_completed_downloads_image = common.get_resource_path('images/download_completed_none.png')
else:
self.info_completed_downloads_image = common.get_resource_path('images/download_completed.png')
- self.info_completed_downloads_count.setText(' {1:d}'.format(self.info_completed_downloads_image, count))
+ self.info_completed_downloads_count.setText(' {1:d}'.format(self.info_completed_downloads_image, count))
self.info_completed_downloads_count.setToolTip(strings._('info_completed_downloads_tooltip', True).format(count))
def update_downloads_in_progress(self, count):
@@ -695,7 +695,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
self.info_in_progress_downloads_image = common.get_resource_path('images/download_in_progress_none.png')
else:
self.info_in_progress_downloads_image = common.get_resource_path('images/download_in_progress.png')
- self.info_in_progress_downloads_count.setText(' {1:d}'.format(self.info_in_progress_downloads_image, count))
+ self.info_in_progress_downloads_count.setText(' {1:d}'.format(self.info_in_progress_downloads_image, count))
self.info_in_progress_downloads_count.setToolTip(strings._('info_in_progress_downloads_tooltip', True).format(count))
def closeEvent(self, e):