Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #34283 +/- ##
============================================
+ Coverage 65.11% 65.15% +0.04%
- Complexity 18338 18352 +14
============================================
Files 1199 1200 +1
Lines 69634 69698 +64
Branches 1283 1283
============================================
+ Hits 45340 45413 +73
+ Misses 23920 23911 -9
Partials 374 374
Continue to review full report at Codecov.
|
b7228de to
4cd2eda
Compare
1bc87b2 to
eb05df4
Compare
PVince81
left a comment
There was a problem hiding this comment.
See comments.
I wonder if this is enough as there might be other code paths related to trashbin: try having version previews for files that were deleted in trashbin, the trigger trashbin expiration. This will like trigger https://github.com/owncloud/enterprise/issues/3067 and might trigger some other hook methods.
|
I like how you refactored the static methods to be able to write tests! |
|
codecov however seems less enthusiastic... and fails to load 😡 |
@PVince81 |
@PVince81
here is log (nothing fishy) So there is nothing to fix for the trashbin IMO unless such agressive deletion of preview is unexpected |
|
The fix is incomplete, preDelete hook should also have the same changes. |
80a8195 to
806866d
Compare
I seem to remember that the code was deleting more than just the expected previews, which is a bit brutal. Can you recheck the exact path that is getting deleted from the code ? |
it's due |
8749a66 to
47c0735
Compare
|
@PVince81 description updated to describe 3 bugs that are already fixed in this PR. |
|
I'll list my expectations here. This is how the things work within this PR:
|
|
@PVince81 please rereview |
|
@VicDeo please backport |
|
stable10: #34533 |
Description
uidis always known - pass it within theversion_deletehook infooriginal_paththat contains a path to the versioned fileand
deleted_revision- versionId for the deleted versionversionIdto deleteAllPreviews when we need to remove previous for the specific version onlyRelated Issue
https://github.com/owncloud/enterprise/issues/2904
Motivation and Context
How Has This Been Tested?
Case 1
Expected result
version previews for cleaned up versions are deleted
No errors
Actual result
version previews for cleaned up versions are NOT deleted
Case 2
Expected result
Only file previews are deleted
Actual result
File previews and all versions previews are deleted
Case 3
delete a directory with a file and browse to the file in the trashbin
Expected result
File in deleted directory has a prievew
Actual result
No file preview
Types of changes
Checklist:
Open tasks: