diff options
author | morpheus65535 <[email protected]> | 2021-04-15 16:37:53 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-04-15 16:37:53 -0400 |
commit | b02e0ec7ec462b9236a413aa9363d0825d3c6e3e (patch) | |
tree | 126f5610c6ac6f97deaedb039d40eea344996569 | |
parent | 99fc282b07f4be07ebf84255603385bd6899bcf8 (diff) | |
download | bazarr-b02e0ec7ec462b9236a413aa9363d0825d3c6e3e.tar.gz bazarr-b02e0ec7ec462b9236a413aa9363d0825d3c6e3e.zip |
Fixed upgrade process to properly use bazarr.zip asset #1379
-rw-r--r-- | bazarr/check_update.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bazarr/check_update.py b/bazarr/check_update.py index 4560a994b..0db40b247 100644 --- a/bazarr/check_update.py +++ b/bazarr/check_update.py @@ -121,7 +121,9 @@ def apply_update(): logging.debug('BAZARR is trying to unzip this release to {0}: {1}'.format(bazarr_dir, bazarr_zip)) try: with ZipFile(bazarr_zip, 'r') as archive: - zip_root_directory = archive.namelist()[0] + zip_root_directory = '' + if len({item.split('/')[0] for item in archive.namelist()}) == 1: + zip_root_directory = archive.namelist()[0] if os.path.isdir(build_dir): try: |