Properly escape filename when downloading files

This commit is contained in:
Girish Ramakrishnan
2019-03-04 13:07:14 -08:00
parent 8d39faddc9
commit aa19cbbfc7
2 changed files with 2 additions and 1 deletions

View File

@@ -1393,6 +1393,7 @@ function downloadFile(appId, filePath, callback) {
assert.strictEqual(typeof filePath, 'string');
assert.strictEqual(typeof callback, 'function');
debug(`downloadFile: ${filePath}`); // no need to escape filePath because we don't rely on bash
exec(appId, { cmd: [ 'stat', '--printf=%F-%s', filePath ], tty: true }, function (error, stream) {
if (error) return callback(error);