Skip to content

Conversation

@come-nc
Copy link
Contributor

@come-nc come-nc commented Feb 28, 2022

When an odt file is xml and not zip, it would throw a ValueError.
It will now just ignore this file and return null for the preview.

Fix #25340

Signed-off-by: Côme Chilliet come.chilliet@nextcloud.com

@come-nc come-nc added the 3. to review Waiting for reviews label Feb 28, 2022
@come-nc come-nc added this to the Nextcloud 24 milestone Feb 28, 2022
@come-nc come-nc self-assigned this Feb 28, 2022
When an odt file is xml and not zip, it would throw a ValueError.
It will now just ignore this file and return null for the preview.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
@come-nc come-nc force-pushed the fix/opendocument-preview-avoid-errors branch from c1a57e6 to 13c1120 Compare February 28, 2022 14:43
@come-nc come-nc requested review from a team, ArtificialOwl, juliusknorr and nickvergessen and removed request for a team February 28, 2022 14:44
Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far I've only seen full-XML office files using a different file ending (.fodt for example) which would the not be handled due to a different mime type (https://github.com/nextcloud/server/pull/29157/files#diff-f89544ac76d4f0e2cd70b4979d625b3992a72fa26c6f0b5fe92ec0364b9716e9R197-R200)

However makes sense to handle those errors more gracefully, especially if such files exist out there.

@come-nc come-nc merged commit ce87b44 into master Mar 1, 2022
@come-nc come-nc deleted the fix/opendocument-preview-avoid-errors branch March 1, 2022 13:10
@come-nc come-nc added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Mar 1, 2022
@szaimen
Copy link
Contributor

szaimen commented Mar 1, 2022

backports?

@nickvergessen
Copy link
Member

/backport to stable23

@nickvergessen
Copy link
Member

/backport to stable22

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

Labels

4. to release Ready to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zip related error in the log (a few of them)

5 participants