Define paths according to presence of uninstall.exe
This commit is contained in:
parent
c6c0774ec5
commit
d81db41f16
16
src/storage.py
Normal file
16
src/storage.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals # at top of module
|
||||||
|
from platform_utils import paths
|
||||||
|
import os
|
||||||
|
import glob
|
||||||
|
|
||||||
|
data_directory = None
|
||||||
|
|
||||||
|
def setup():
|
||||||
|
global data_directory
|
||||||
|
if len(glob.glob("Uninstall.exe")) > 0: # installed copy
|
||||||
|
if os.path.exists(paths.app_data_path("musicDL")) == False:
|
||||||
|
paths.prepare_app_data_path("musicDL")
|
||||||
|
data_directory = paths.app_data_path("musicDL")
|
||||||
|
else:
|
||||||
|
data_directory = paths.app_path()
|
Loading…
Reference in New Issue
Block a user