From 2008f55166d225a525a8c12c3eac062b1ddf79c0 Mon Sep 17 00:00:00 2001 From: Matt Hoover Date: Mon, 16 Apr 2018 16:15:58 -0400 Subject: [PATCH] fix(download) download files with "#" in name (#80) --- client/modules/menu.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/client/modules/menu.js b/client/modules/menu.js index 1a9d907a..0e717625 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -309,16 +309,15 @@ function MenuProto(Position) { files.forEach((file) => { const selected = DOM.isSelected(file); const isDir = DOM.isCurrentIsDir(file); + const path = DOM.getCurrentPath(file); + + CloudCmd.log('downloading file ' + path + '...'); /* * if we send ajax request - * no need in hash so we escape # * and all other characters, like "%" */ - const path = DOM.getCurrentPath(file) - .replace(/#/g, '%23'); - - CloudCmd.log('downloading file ' + path + '...'); - const encodedPath = encodeURI(path); + const encodedPath = encodeURI(path).replace(/#/g, '%23'); const id = load.getIdBySrc(path); let src;