From 11e88f49391a4a38145670f731d20a1fa66040d4 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Mon, 28 Jan 2013 09:48:03 +0100 Subject: [PATCH] call ajax scan only if a user is logged in - otherwise we'll get a 500 --- apps/files/js/files.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 6486468eaf..64866aea39 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 = [];