fix: Throw exception in PreviewManager when preview is not available#52859
Conversation
|
I'm not sure if this is the right way, but changing a default value in the API should be avoided as it means a breaking change in the behavior. The root of the issue is likely somewhere else. |
@provokateurin I agree with your concern generally However, in this case:
|
come-nc
left a comment
There was a problem hiding this comment.
but forceIcon should return an icon if preview is disabled, not compute a preview, no?
|
That's what I think as well and it's why I said that I think the problem is elsewhere. |
@come-nc @provokateurin I was not aware that this was the intention of the parameter; let me dig deeper then |
913ba89 to
e395304
Compare
|
@provokateurin @come-nc Please check now. Earlier the exception was thrown only if previews are disabled system-wide; now it is thrown if previews are not available for whatever reason using the |
Signed-off-by: Akhil <akhil@e.email>
e395304 to
e537500
Compare
provokateurin
left a comment
There was a problem hiding this comment.
Looks sane to me, the method definitely should have used isAvailable() since that checks if the storage allows/supports it.
|
/backport to stable31 |
|
/backport to stable30 |
|
CI failure are unrelated for phpunit, and the others are because this comes from a fork. |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Before:
After:
TODO
Checklist