Make sure we don't scan files that can not be accessed#1972
Conversation
|
@nickvergessen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @DeepDiver1975 and @butonic to be potential reviewers. |
|
|
I will fix that, once @icewind1991 confirmed this is the way to go. |
lib/private/Files/Cache/Scanner.php
Outdated
| */ | ||
| public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null, $lock = true) { | ||
|
|
||
| if (!\OC::$server->getDatabaseConnection()->supports4ByteText()) { |
There was a problem hiding this comment.
Can't we reuse the fragment from somewhere else (View?) and just call that
There was a problem hiding this comment.
That was exactly what I wondered aswell, but I think the cache is inside the view, so this looks shitty from dependency pov. But should we just move it to a separate helper or something?
There was a problem hiding this comment.
@icewind1991 should we simply move all the checks from the View into IStorage::verifyPath and in the view then simply resolve the path to the storage and call the method?
7dcfb6f to
682307c
Compare
|
@icewind1991 moved the validation from view to storage so it's in one place only |
682307c to
00fbb5b
Compare
|
Tested and works 👍 @rullzer @icewind1991 Please review :) |
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
00fbb5b to
558f169
Compare
|
Fine by me 👍 But lets have our fs guru have the last vote. Summoning @icewind1991 |
|
👍 |
|
@nickvergessen Could you open the backport PR? Thanks |
Steps
files:scan adminWith this fix the file is not added on scanning.
@icewind1991 @MorrisJobke @LukasReschke
Fix #1965