From 31ad443da504a5a51d756553a23c6b3de644236b Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Tue, 17 May 2016 15:25:13 +0100 Subject: [PATCH] Another filename encoding fix --- plugins/c9.vfs.server/download.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/c9.vfs.server/download.js b/plugins/c9.vfs.server/download.js index b1dbea6f..ec26e2ca 100644 --- a/plugins/c9.vfs.server/download.js +++ b/plugins/c9.vfs.server/download.js @@ -113,10 +113,8 @@ define(function(require, exports, module) { paths.forEach(function(path) { if (!path) return; path = Path.relative(cwd, path); - // tar misinterprets the Windows path separator as an escape sequence, so use forward slash. - if (Path.sep === '\\') { - path = path.replace(/\\/g, '/'); - } + // Single quote the path to escape unusual characters, and manually escape single quotes. + path = "'" + path.replace(/'/, "'\\''") + "'"; args.push(path); });