fix icons.db creation during startup
This commit is contained in:
parent
3969f6dfa7
commit
f8d226a3de
2 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ def command_postupdate(*args):
|
||||||
print('usage: -o oldversion -n newversion')
|
print('usage: -o oldversion -n newversion')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if old <= '20140521-65-e14c686' and new > '20140521-65-e14c686':
|
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')
|
r('./ctl', 'setup')
|
||||||
import setup
|
import setup
|
||||||
setup.upgrade_db(old, new)
|
setup.upgrade_db(old, new)
|
||||||
|
|
|
@ -140,7 +140,7 @@ def get_icons_db_path():
|
||||||
import settings
|
import settings
|
||||||
import shutil
|
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')
|
metadata = os.path.join(library, 'Metadata')
|
||||||
icons_db_path = os.path.join(metadata, 'icons.db')
|
icons_db_path = os.path.join(metadata, 'icons.db')
|
||||||
if os.path.exists(os.path.dirname(library)):
|
if os.path.exists(os.path.dirname(library)):
|
||||||
|
|
Loading…
Reference in a new issue