Update creating Home_Config variable for packaging support, added .HOMEDIR to ignored filename during update

This commit is contained in:
Ozzie Isaacs 2021-02-07 09:20:37 +01:00
parent 251a77c8b4
commit 60497c60c1
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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: