-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 for previews not being generated sometimes #41067
Conversation
Signed-off-by: Akhil <akhil@e.email>
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.
Doesn't hurt!
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.
@come-nc IIRC, you looked into the null
file id on some file events. Is it similar?
Not really, here it’s expected for the node to have no id since it’s new, I think. In the cases I looked into it was paths outside the user directory which ended up trigerring events on null paths. |
@blizzz backport? 🤔 |
I understand it was first discovered on 25, so since then everything is affected. |
/skjnldsv-backport to stable28 |
/skjnldsv-backport to stable27 |
/skjnldsv-backport to stable26 |
/backport to stable28 |
Hm, does backporting not work if it’s from a fork? |
cc @skjnldsv |
Summary
A lot of unnecessary
rmdir
calls are done on the preview directoryAfter investigating, here are the findings to justify the fix:
server/lib/private/Files/FileInfo.php
Line 164 in 834c9a2
int
ornull
null
return by this method call over here makes sure that an empty string is passed to$this->appData->getFolder()
appdata_*****/preview
in our caseOn our instance we did find logs that a delete is attempted on the entire preview folder as per [Bug]: Preview for some photos not generated #36463 (comment)
Further, by logging I could confirm that
$node->getId()
is indeed null in one case leading to consistent triggering of thisrmdir
One case is the upload of a partial file (
.part
extension)isPartialFile
.part
extension succesfully triggers anrmdir
of the entire preview directoryStack trace of the bug
Checklist