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); });