-
Notifications
You must be signed in to change notification settings - Fork 2.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
[trashbin] replace hook with storage wrapper #13377
Conversation
@schiesbn local unit test execution helps ;-)
|
and using a proper ide 🙊 |
private $mountPoint; | ||
// remember already deleted files to avoid infinite loop if the trash bin | ||
// move files across storages | ||
private static $deletedFiles = array(); |
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.
does this have to be static? I mean: will there ever be files being deleted in two different storage implementations?
@schiesbn Can I ask you to label your PRs too? something like "4 - Developing" for WIP PRs or "5 - To review" for ready to review PRs. Then stuff like "app:files_trashbin" to label the component. This helps a lot to master the huge amount of PRs/issues and are just 3 clicks away ;) |
3f111cb
to
5c7b6be
Compare
|
5c7b6be
to
f67942b
Compare
@@ -192,6 +194,8 @@ public static function move2trash($file_path) { | |||
if ($user !== $owner) { | |||
self::copyFilesToOwner($file_path, $owner, $ownerPath, $timestamp); | |||
} | |||
|
|||
$result = true; |
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.
From scrutinizer:
The assignment to $result is dead and can be removed.
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.
removed
beae124
to
379dcd8
Compare
379dcd8
to
15ae6b4
Compare
The inspection completed: 5 updated code elements |
Refer to this link for build results (access rights to CI server needed): |
tested 👍 |
@icewind1991 @MorrisJobke @PVince81 can you please test this? THX |
Tested with/without external storages, 👍 |
[trashbin] replace hook with storage wrapper
@schiesbn I got a question from @cdamken Is this the PR that fixes owncloud/client#2858 and is it reasonable/possible to backport this to stable7 ? cc @icewind1991 |
NO - additional fixes had to be applied on top - too risky - upgrade to 8 of disable trashbin |
This is a minimal approach to replace the delete hook with a storage wrapper. This allows us to perform a move instead of a copy while moving files to the trash bin which will give us a huge performance improvement.
cc @DeepDiver1975 @icewind1991