aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-01-28 09:48:03 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-01-28 09:48:03 +0100
commit11e88f49391a4a38145670f731d20a1fa66040d4 (patch)
tree4440600156e5962ba91a4b50ec8cddc196f60850
parent47ce3c2160656086a4c515798abd9e37edc7f2c0 (diff)
downloadnextcloud-server-11e88f49391a4a38145670f731d20a1fa66040d4.tar.gz
nextcloud-server-11e88f49391a4a38145670f731d20a1fa66040d4.zip
call ajax scan only if a user is logged in - otherwise we'll get a 500
-rw-r--r--apps/files/js/files.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 6486468eafd..64866aea394 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -667,11 +667,13 @@ $(document).ready(function() {
});
//check if we need to scan the filesystem
- $.get(OC.filePath('files','ajax','scan.php'),{checkonly:'true'}, function(response) {
- if(response.data.done){
- scanFiles();
- }
- }, "json");
+ if (OC.currentUser) {
+ $.get(OC.filePath('files','ajax','scan.php'),{checkonly:'true'}, function(response) {
+ if(response.data.done){
+ scanFiles();
+ }
+ }, "json");
+ }
var lastWidth = 0;
var breadcrumbs = [];