summaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js48
1 files changed, 0 insertions, 48 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index e33b8354437..6bf4a4cfe5a 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -243,9 +243,6 @@
e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone
});
- //do a background scan if needed
- scanFiles();
-
// display storage warnings
setTimeout(Files.displayStorageWarnings, 100);
@@ -323,51 +320,6 @@
OCA.Files.Files = Files;
})();
-function scanFiles(force, dir, users) {
- if (!OC.currentUser) {
- return;
- }
-
- if (!dir) {
- dir = '';
- }
- force = !!force; //cast to bool
- scanFiles.scanning = true;
- var scannerEventSource;
- if (users) {
- var usersString;
- if (users === 'all') {
- usersString = users;
- } else {
- usersString = JSON.stringify(users);
- }
- scannerEventSource = new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force: force,dir: dir, users: usersString});
- } else {
- scannerEventSource = new OC.EventSource(OC.filePath('files','ajax','scan.php'),{force: force,dir: dir});
- }
- scanFiles.cancel = scannerEventSource.close.bind(scannerEventSource);
- scannerEventSource.listen('count',function(count) {
- console.log(count + ' files scanned');
- });
- scannerEventSource.listen('folder',function(path) {
- console.log('now scanning ' + path);
- });
- scannerEventSource.listen('error',function(message) {
- console.error('Scanner error: ', message);
- });
- scannerEventSource.listen('done',function(count) {
- scanFiles.scanning=false;
- console.log('done after ' + count + ' files');
- if (OCA.Files.App) {
- OCA.Files.App.fileList.updateStorageStatistics(true);
- }
- });
- scannerEventSource.listen('user',function(user) {
- console.log('scanning files for ' + user);
- });
-}
-scanFiles.scanning=false;
-
// TODO: move to FileList
var createDragShadow = function(event) {
// FIXME: inject file list instance somehow