-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix: Throw exception in PreviewManager when preview is not available #52859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
e395304 to
e537500
Compare
provokateurin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
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