-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Return the fileid from copyFromCache
and use it instead of doing an extra query
#26013
Conversation
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.
Didn't test but the code makes sense!
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 fine, see comments if applicable
$folderContent = $sourceCache->getFolderContentsById($sourceEntry->getId()); | ||
foreach ($folderContent as $subEntry) { | ||
$subTargetPath = $targetPath . '/' . $subEntry->getName(); | ||
$this->copyFromCache($sourceCache, $subEntry, $subTargetPath); |
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.
I guess we're not afraid of very deep folder structures and stack overflows ?
Edit: just saw it's old copied code, but something to keep in mind as tech debt?
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
ea09768
to
d7748e2
Compare
build restarted... |
/backport to stable21 |
/backport to stable20 |
/backport to stable19 |
Also move the existing
copyFromCache
code around and expose it trough the public interface.