diff --git a/cps/constants.py b/cps/constants.py index ac48a5b8..613d17ac 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -21,8 +21,10 @@ import sys import os from collections import namedtuple -# if installed via pip this variable is set to true -HOME_CONFIG = False +# if installed via pip this variable is set to true (empty file with name .HOMEDIR present) +HOME_CONFIG = os.path.isfile(os.path.join(os.path.dirname(os.path.abspath(__file__)), '.HOMEDIR')) + +#In executables updater is not available, so variable is set to False there UPDATER_AVAILABLE = True # Base dir is parent of current file, necessary if called from different folder diff --git a/cps/updater.py b/cps/updater.py index b03a0844..4d5117a9 100644 --- a/cps/updater.py +++ b/cps/updater.py @@ -227,7 +227,7 @@ class Updater(threading.Thread): os.sep + 'vendor', os.sep + 'calibre-web.log', os.sep + '.git', os.sep + 'client_secrets.json', os.sep + 'gdrive_credentials', os.sep + 'settings.yaml', os.sep + 'venv', os.sep + 'virtualenv', os.sep + 'access.log', os.sep + 'access.log1', os.sep + 'access.log2', - os.sep + '.calibre-web.log.swp', os.sep + '_sqlite3.so' + os.sep + '.calibre-web.log.swp', os.sep + '_sqlite3.so', os.sep + 'cps' + os.sep + '.HOMEDIR' ) additional_path = self.is_venv() if additional_path: