From 0124809a42dd72d9c6d9b550687fa0013a88b6da Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 1 Feb 2012 15:33:12 +0100 Subject: prevent sharing from making aditional http requests while scanning additional requests to the server can block feedback of scannning depending on server configuration --- files/js/files.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'files/js/files.js') diff --git a/files/js/files.js b/files/js/files.js index 0eca0959def..bebcf4e97a4 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -347,6 +347,7 @@ $(document).ready(function() { function scanFiles(force){ force=!!force; //cast to bool + scanFiles.scanning=true; $('#scanning-message').show(); $('#fileList').remove(); var scannerEventSource=new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force:force}); @@ -356,6 +357,7 @@ function scanFiles(force){ $('#scan-current').text(data.file+'/'); }); scannerEventSource.listen('success',function(success){ + scanFiles.scanning=false; if(success){ window.location.reload(); }else{ @@ -363,6 +365,7 @@ function scanFiles(force){ } }); } +scanFiles.scanning=false; function boolOperationFinished(data, callback) { result = jQuery.parseJSON(data.responseText); -- cgit v1.2.3