Fix repository uploads with remove_repo_files_not_in_tar

This fixes erroneously deleting the just uploaded files, which otherwise
happens in
```
                    if full_name not in filenames_in_archive:
                        files_to_remove.append(full_name)
```
This commit is contained in:
mvdbeek
2022-02-21 10:28:41 +01:00
parent 76a8e12d21
commit 907130d772
+1 -1
View File
@@ -154,7 +154,7 @@ def handle_directory_changes(app, host, username, repository, full_path, filenam
repo_path = repository.repo_path(app)
content_alert_str = ''
files_to_remove = []
filenames_in_archive = [os.path.join(full_path, name) for name in filenames_in_archive]
filenames_in_archive = [os.path.normpath(os.path.join(full_path, name)) for name in filenames_in_archive]
if remove_repo_files_not_in_tar and not repository.is_new():
# We have a repository that is not new (it contains files), so discover those files that are in the
# repository, but not in the uploaded archive.