Allow scanning for metadata with occ scan:file --metadata#32309
Allow scanning for metadata with occ scan:file --metadata#32309CarlSchwan wants to merge 1 commit intomasterfrom
Conversation
Signed-off-by: Carl Schwan <[email protected]>
6a611e3 to
b59fd08
Compare
| // FIXME ugly hack to get it working for local file | ||
| array_shift($pathParts); | ||
| array_shift($pathParts); | ||
| array_shift($pathParts); |
There was a problem hiding this comment.
I think you can add an argument to explode to only do so for the first three or something and then keep the rest
did you check if using Filesystem::resolvePath would work here ?
There was a problem hiding this comment.
The issue is that these array_shift shouldn't even exists :( This should work:
$info = Filesystem::getFileInfo($path);There was a problem hiding this comment.
iirc $path is absolute here right?
Inject a IRootFolder into the command and use IRootFolder::get instead of using the old static filesystem apis
| // FIXME ugly hack to get it working for local file | ||
| array_shift($pathParts); | ||
| array_shift($pathParts); | ||
| array_shift($pathParts); |
There was a problem hiding this comment.
iirc $path is absolute here right?
Inject a IRootFolder into the command and use IRootFolder::get instead of using the old static filesystem apis
|
|
||
| $scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) { | ||
| /** @var MetadataManager $metadataManager */ | ||
| $metadataManager = \OC::$server->get(MetadataManager::class); |
There was a problem hiding this comment.
Should be injected instead of possible
|
Just testing NC25... |
|
obsoleted by #33511 |
This is an option since the scanning will take longer with the metadata scanning
Currently, the getNodeForPath function also needs to be fixed since the path manipulation with array_shift shouldn't be required, but I have no idea what to do instead. This was copied from the hookconnector class