call ajax scan only if a user is logged in - otherwise we'll get a 500
This commit is contained in:
parent
47ce3c2160
commit
11e88f4939
|
@ -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 = [];
|
||||
|
|
Loading…
Reference in New Issue