summaryrefslogtreecommitdiffstats
path: root/files/js/files.js
diff options
context:
space:
mode:
Diffstat (limited to 'files/js/files.js')
-rw-r--r--files/js/files.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/files/js/files.js b/files/js/files.js
index a896314faf0..0eca0959def 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -347,15 +347,13 @@ $(document).ready(function() {
function scanFiles(force){
force=!!force; //cast to bool
- var fileCount=0;
$('#scanning-message').show();
$('#fileList').remove();
var scannerEventSource=new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force:force});
scanFiles.cancel=scannerEventSource.close.bind(scannerEventSource);
- scannerEventSource.listen('scanned',function(file){
- fileCount++;
- $('#scan-count').text(fileCount+' files scanned');
- $('#scan-current').text(file);
+ scannerEventSource.listen('scanning',function(data){
+ $('#scan-count').text(data.count+' files scanned');
+ $('#scan-current').text(data.file+'/');
});
scannerEventSource.listen('success',function(success){
if(success){