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 + '/'; }