summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/scan.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/ajax/scan.php')
-rw-r--r--apps/files/ajax/scan.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php
index 53ae4f5ff04..391b98608bd 100644
--- a/apps/files/ajax/scan.php
+++ b/apps/files/ajax/scan.php
@@ -20,13 +20,14 @@ $mountPoints = array_reverse($mountPoints); //start with the mount point of $dir
foreach ($mountPoints as $mountPoint) {
$storage = \OC\Files\Filesystem::getStorage($mountPoint);
- error_log('scanning mp '.$mountPoint);
- ScanListener::$mountPoints[$storage->getId()] = $mountPoint;
- $scanner = $storage->getScanner();
- if ($force) {
- $scanner->scan('');
- } else {
- $scanner->backgroundScan();
+ if ($storage) {
+ ScanListener::$mountPoints[$storage->getId()] = $mountPoint;
+ $scanner = $storage->getScanner();
+ if ($force) {
+ $scanner->scan('');
+ } else {
+ $scanner->backgroundScan();
+ }
}
}