Fixed config directory being deleted during upgrade leftover removal routine.

This commit is contained in:
morpheus65535 2021-11-29 13:09:33 -05:00
parent c2e44b981e
commit 6a88596aab
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ def update_cleaner(zipfile, bazarr_dir, config_dir):
'^venv' + separator, '^venv' + separator,
'^WinPython' + separator, '^WinPython' + separator,
separator + '__pycache__' + separator + '$'] separator + '__pycache__' + separator + '$']
if os.path.abspath(bazarr_dir) in os.path.abspath(config_dir): if os.path.abspath(bazarr_dir).lower() in os.path.abspath(config_dir).lower():
dir_to_ignore.append('^' + os.path.relpath(config_dir, bazarr_dir) + os.path.sep) dir_to_ignore.append('^' + os.path.relpath(config_dir, bazarr_dir) + os.path.sep)
dir_to_ignore_regex = re.compile('(?:% s)' % '|'.join(dir_to_ignore)) dir_to_ignore_regex = re.compile('(?:% s)' % '|'.join(dir_to_ignore))
logging.debug('BAZARR upgrade leftover cleaner will ignore directories matching this regex: ' logging.debug('BAZARR upgrade leftover cleaner will ignore directories matching this regex: '