Merge pull request #122 from Barryrowe/master

Append Trailing Slash If Not Present On path Param
This commit is contained in:
Ibrahim Hadeed 2016-05-12 22:06:53 -04:00
commit 62f71b2221

View File

@ -50,7 +50,11 @@ export class File {
if ((/^\//.test(dir))) {
rejectFn('directory cannot start with \/');
}
if (!(/\/$/.test(noSlash))) {
path += "/";
}
try {
var directory = path + dir;
@ -351,6 +355,10 @@ export class File {
rejectFn('file cannot start with \/');
}
if (!(/\/$/.test(noSlash))) {
path += "/";
}
try {
var directory = path + file;