mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
Merge pull request #122 from Barryrowe/master
Append Trailing Slash If Not Present On path Param
This commit is contained in:
commit
62f71b2221
@ -50,7 +50,11 @@ export class File {
|
|||||||
if ((/^\//.test(dir))) {
|
if ((/^\//.test(dir))) {
|
||||||
rejectFn('directory cannot start with \/');
|
rejectFn('directory cannot start with \/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(/\/$/.test(noSlash))) {
|
||||||
|
path += "/";
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var directory = path + dir;
|
var directory = path + dir;
|
||||||
|
|
||||||
@ -351,6 +355,10 @@ export class File {
|
|||||||
rejectFn('file cannot start with \/');
|
rejectFn('file cannot start with \/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(/\/$/.test(noSlash))) {
|
||||||
|
path += "/";
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var directory = path + file;
|
var directory = path + file;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user