From ace66057f27d868ef2f89049b89d4ff53f021c2a Mon Sep 17 00:00:00 2001 From: Erik Pellikka Date: Sun, 10 Jan 2016 18:56:18 +0200 Subject: [PATCH] Fixed issue #21452 removed whitespace removed whitespace Changed it based on PVince81's suggestion --- apps/files/js/filelist.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index d5b30d6299..d0c7687e5b 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -642,7 +642,13 @@ }; OCA.Files.FileActions.updateFileActionSpinner(downloadFileaction, true); - OCA.Files.Files.handleDownload(this.getDownloadUrl(files, dir, true), disableLoadingState); + if(this.getSelectedFiles().length > 1) { + OCA.Files.Files.handleDownload(this.getDownloadUrl(files, dir, true), disableLoadingState); + } + else { + first = this.getSelectedFiles()[0]; + OCA.Files.Files.handleDownload(this.getDownloadUrl(first.name, dir, true), disableLoadingState); + } return false; },