From a719ae70a763249f4bab4d3eaf65c2e496b6ac6c Mon Sep 17 00:00:00 2001 From: "David J. Bradshaw" Date: Wed, 19 Mar 2014 18:31:30 +0100 Subject: [PATCH] Don't add '/' to empty path --- tasks/sftp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/sftp.js b/tasks/sftp.js index 69a2fbf..76e6944 100644 --- a/tasks/sftp.js +++ b/tasks/sftp.js @@ -61,7 +61,7 @@ module.exports = function (grunt) { setOption('showProgress'); // add trailing slash to path if needed - if (!options.path.match(/(\/|\\)$/)) { + if ((''!==options.path) && !options.path.match(/(\/|\\)$/)) { options.path = options.path + '/'; }