diff options
Diffstat (limited to 'onionshare/common.py')
-rw-r--r-- | onionshare/common.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/onionshare/common.py b/onionshare/common.py index d90f3b78..0d00c7b1 100644 --- a/onionshare/common.py +++ b/onionshare/common.py @@ -56,7 +56,7 @@ def get_platform(): """ Returns the platform OnionShare is running on. """ - plat = platform.system() + plat = platform.system() if plat.endswith('BSD'): 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') |