Skip to content

Inform users of missing files in archive#58895

Closed
salmart-dev wants to merge 2 commits intomasterfrom
fix/zipfolderplugin-error-handling
Closed

Inform users of missing files in archive#58895
salmart-dev wants to merge 2 commits intomasterfrom
fix/zipfolderplugin-error-handling

Conversation

@salmart-dev
Copy link
Contributor

@salmart-dev salmart-dev commented Mar 12, 2026

Took over some of the changes from #57335, thanks @Koc

Summary

The ZipFolderPlugin halts the streaming of an archive for download due to various factors, such as storage issues with a file, temporary database problems, or a lost network connection. Because the plugin streams without a content-length header, the user receives an incomplete archive without any warning. In some cases, this issue only becomes apparent when attempting to open a file in the archive and discovering that the entire archive is corrupted.

This PR partially addresses the problem by introducing a new working mode for the plugin. If the configuration value for archive_report_missing_files is set to true the following happens:

  • files that are marked as not downloadable will not block producing the whole archive, unless the root directory where the download is started from is marked as not downloadable
  • a missing_files.json file is added within the archive if any file or directories are missing due to errors, along with the cause
  • streams are checked to confirm that they have been fully consumed, to avoid silently archiving files partially

TODO

  • Write tests
  • Translations
  • Update documentation where needed

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@salmart-dev salmart-dev self-assigned this Mar 12, 2026
@salmart-dev salmart-dev added the 2. developing Work in progress label Mar 12, 2026
@salmart-dev salmart-dev force-pushed the fix/zipfolderplugin-error-handling branch from 5fe8953 to 9b42f6a Compare March 12, 2026 17:51
@salmart-dev salmart-dev force-pushed the fix/zipfolderplugin-error-handling branch from 9b42f6a to 5ddc8b0 Compare March 13, 2026 12:10
…wnload folder with non-downloadable files

Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@salmart-dev salmart-dev force-pushed the fix/zipfolderplugin-error-handling branch 2 times, most recently from 946a530 to 309a528 Compare March 13, 2026 12:54
@salmart-dev salmart-dev added this to the Nextcloud 33.0.2 milestone Mar 13, 2026
@salmart-dev salmart-dev force-pushed the fix/zipfolderplugin-error-handling branch 8 times, most recently from fa71715 to 7f73824 Compare March 18, 2026 17:11
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
@salmart-dev salmart-dev force-pushed the fix/zipfolderplugin-error-handling branch from 7f73824 to a783e8e Compare March 18, 2026 17:23
@salmart-dev
Copy link
Contributor Author

Closing in favor of: #59049 (branch name corrected with feature)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] ZipFolderPlugin fails silently on errors

3 participants