Scan mount points in root before adding a entry
This commit is contained in:
parent
106541361c
commit
aa15fcf22f
|
@ -767,8 +767,17 @@ class View {
|
|||
$subStorage = Filesystem::getStorage($mountPoint);
|
||||
if ($subStorage) {
|
||||
$subCache = $subStorage->getCache('');
|
||||
$rootEntry = $subCache->get('');
|
||||
|
||||
if ($subCache->getStatus('') < Cache\Cache::COMPLETE) {
|
||||
$subScanner = $subStorage->getScanner('');
|
||||
$subScanner->scan('', Cache\Scanner::SCAN_SHALLOW);
|
||||
} else {
|
||||
$subWatcher = $subStorage->getWatcher('');
|
||||
$subWatcher->checkUpdate('');
|
||||
}
|
||||
|
||||
$rootEntry = $subCache->get('');
|
||||
if ($rootEntry) {
|
||||
$relativePath = trim(substr($mountPoint, $dirLength), '/');
|
||||
if ($pos = strpos($relativePath, '/')) { //mountpoint inside subfolder add size to the correct folder
|
||||
$entryName = substr($relativePath, 0, $pos);
|
||||
|
@ -791,6 +800,7 @@ class View {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($mimetype_filter) {
|
||||
foreach ($files as $file) {
|
||||
|
|
Loading…
Reference in New Issue