summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/scan.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-11-24 16:42:54 -0500
committerMichael Gapczynski <mtgap@owncloud.com>2012-11-24 16:42:54 -0500
commitc47bf9bbcefb0640c24ab0aa6ee79f4c52222b45 (patch)
treebb14ec2a885d16a3003c4de6400369216ffc59fa /apps/files/ajax/scan.php
parent555dec2d92316e47edd775d4e63ffe60fb0eca6b (diff)
downloadnextcloud-server-c47bf9bbcefb0640c24ab0aa6ee79f4c52222b45.tar.gz
nextcloud-server-c47bf9bbcefb0640c24ab0aa6ee79f4c52222b45.zip
Add checks for storage object
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();
+ }
}
}