Commit d904812f by Johannes Zellner

Fix relative path detection

1 parent d53a1669
Showing with 2 additions and 1 deletions
......@@ -97,9 +97,10 @@ function put(filePath, otherFilePaths, options) {
async.eachSeries(files, function (file, callback) {
var relativeFilePath;
if (path.isAbsolute(file)) {
relativeFilePath = path.basename(file);
} else if (path.resolve(file).indexOf(process.cwd().length) === 0) { // relative to current dir
} else if (path.resolve(file).indexOf(process.cwd()) === 0) { // relative to current dir
relativeFilePath = path.resolve(file).slice(process.cwd().length + 1);
} else { // relative but somewhere else
relativeFilePath = path.basename(file);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!