Skip to content

Commit

Permalink
Merge pull request #1 from Barryrowe/file-path-end-slash-patch
Browse files Browse the repository at this point in the history
Append trailingSlash if not present on path param
  • Loading branch information
Barryrowe committed Apr 14, 2016
2 parents 94de6b4 + ce2772b commit 9d200e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/plugins/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export class File {
if ((/^\//.test(dir))) {
rejectFn('directory cannot start with \/');
}


if (!(/\/$/.test(noSlash))) {
path += "/";
}

try {
var directory = path + dir;

Expand Down Expand Up @@ -351,6 +355,10 @@ export class File {
rejectFn('file cannot start with \/');
}

if (!(/\/$/.test(noSlash))) {
path += "/";
}

try {
var directory = path + file;

Expand Down

0 comments on commit 9d200e7

Please sign in to comment.