SharedStorage to new sharing code + cleanup#23919
Conversation
|
By analyzing the blame information on this pull request, we identified @icewind1991, @MTGap and @schiesbn to be potential reviewers |
apps/files_sharing/lib/scanner.php
Outdated
There was a problem hiding this comment.
This needs to be handled cleaner
9aba49c to
4827c43
Compare
60a523f to
c57234a
Compare
e45ffa4 to
f10bec3
Compare
|
Ok all seems well. Commits are reorderd and squashed. @nickvergessen could you see if activities and admin_audit still behave as expected? Please review: @icewind1991 @PVince81 @MorrisJobke @DeepDiver1975 |
apps/files_sharing/lib/scanner.php
Outdated
There was a problem hiding this comment.
I think this only works for the home storage.
Also it shouldn't be needed, you can get $sourceStorage and $internalPath from the storage without first going trough the absolute path
There was a problem hiding this comment.
yes you are right. let me see if I can fix that a bit cleaner
There was a problem hiding this comment.
A fixed $storage->resolvePath is what you want
f10bec3 to
b2dfc46
Compare
c6b8d95 to
531f7cb
Compare
531f7cb to
8ad4335
Compare
apps/files_sharing/lib/cache.php
Outdated
| } | ||
|
|
||
| public function moveFromCache(\OCP\Files\Cache\ICache $sourceCache, $sourcePath, $targetPath) { | ||
| parent::moveFromCache($sourceCache, $sourcePath, $this->storage->getSourcePath($targetPath)); |
There was a problem hiding this comment.
was this missing in the past ? Or is this addition specific to this PR's changes ?
There was a problem hiding this comment.
In the past we used the parents function. but now we can't directly because we need to translate the path first.
There was a problem hiding this comment.
This should be moved to CacheJail
There was a problem hiding this comment.
No. Because in the cache jail we don't that it is a shared storage. So we don't know that it has getSourcePath
There was a problem hiding this comment.
UHm I mean a jail storage...
There was a problem hiding this comment.
Or... can we assume that the storage of a cachejail is always a jail?
There was a problem hiding this comment.
CacheJail has it's own getSourcePath
There was a problem hiding this comment.
O stupid me. Ok will fix.
|
admin_audit and activity still work |
| * @return bool | ||
| */ | ||
| public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) { | ||
| return parent::moveFromStorage($sourceStorage, $sourceInternalPath, $this->getSourcePath($targetInternalPath)); |
There was a problem hiding this comment.
These can also be moved to the parent
|
Code looks good otherwise |
8ad4335 to
ff3ffc3
Compare
ff3ffc3 to
b53d659
Compare
|
👍 |
|
I can't judge on the code, but the sharing still works fine (federated shares, link shares, internal shares) So here is my 👍 |
| */ | ||
| public function getStorageId() { | ||
| if (!$this->storageId) { | ||
| $this->storageId = $this->mount->getStorage()->getStorageCache()->getNumericId(); |
There was a problem hiding this comment.
what is this actually done for, the value seems unused? should it be returned?
|
Regression: #25186 |
|
Partial backport (well, only a very small part) to stable9: #25360 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
For #22209
This (big) PR will move the sharedstorage over to the share manager. Since this is not a 1 on 1 transformation this will cleanup the shared storage (and simplify it!) as well.
TODO:
CC: @icewind1991