From f8d226a3dede8d52dbb144389c0986625d3c0fa3 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 30 Jan 2019 22:22:16 +0530 Subject: [PATCH] fix icons.db creation during startup --- oml/commands.py | 2 +- oml/item/icons.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oml/commands.py b/oml/commands.py index d147b2e..25e1fa8 100644 --- a/oml/commands.py +++ b/oml/commands.py @@ -134,7 +134,7 @@ def command_postupdate(*args): print('usage: -o oldversion -n newversion') sys.exit(1) if old <= '20140521-65-e14c686' and new > '20140521-65-e14c686': - if not os.path.exists(settings.db_path): + if not os.path.exists(settings.db_path) and sys.platform != 'win32': r('./ctl', 'setup') import setup setup.upgrade_db(old, new) diff --git a/oml/item/icons.py b/oml/item/icons.py index 0270cb1..be86281 100644 --- a/oml/item/icons.py +++ b/oml/item/icons.py @@ -140,7 +140,7 @@ def get_icons_db_path(): import settings import shutil - library = os.path.expanduser(settings.preferences['libraryPath']) + library = os.path.normpath(os.path.expanduser(settings.preferences['libraryPath'])) metadata = os.path.join(library, 'Metadata') icons_db_path = os.path.join(metadata, 'icons.db') if os.path.exists(os.path.dirname(library)):