diff options
author | JayZed <[email protected]> | 2024-05-27 21:18:45 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-27 21:18:45 -0400 |
commit | 884200441bec801eba56a4ac08328f8227ad3bed (patch) | |
tree | 4706d6034adf49993a013a68500591b376017bcb | |
parent | 0e183c428b1509e4cde77c53c4a47a6393c7a54e (diff) | |
download | bazarr-884200441bec801eba56a4ac08328f8227ad3bed.tar.gz bazarr-884200441bec801eba56a4ac08328f8227ad3bed.zip |
Fix for case insensitive filesystem upatesv1.4.3-beta.41
This fix was made necessary when a library changed the case of one of its files, but kept the name the same.
When the file was updated in place, the case did not change.
The solution is to delete the file first before extracting the new one from the zip file with the changed case.
-rw-r--r-- | bazarr/app/check_update.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bazarr/app/check_update.py b/bazarr/app/check_update.py index 97617c75b..54aeefcce 100644 --- a/bazarr/app/check_update.py +++ b/bazarr/app/check_update.py @@ -165,6 +165,9 @@ def apply_update(): parent_dir = os.path.dirname(file_path) os.makedirs(parent_dir, exist_ok=True) if not os.path.isdir(file_path): + if os.path.exists(file_path): + # remove the file first to handle case-insensitive file systems + os.remove(file_path) with open(file_path, 'wb+') as f: f.write(archive.read(file)) except Exception: |