File tree 1 file changed +1
-2
lines changed
1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ function pathinfo(path, options) {
13
13
// % note 2: But by way we implemented this function, if you want you can still declare the PATHINFO_*
14
14
// % note 2: yourself, and then you can use: pathinfo('/www/index.html', PATHINFO_BASENAME | PATHINFO_EXTENSION);
15
15
// % note 2: which makes it fully compliant with PHP syntax.
16
- // - depends on: dirname
17
16
// - depends on: basename
18
17
// * example 1: pathinfo('/www/htdocs/index.html', 1);
19
18
// * returns 1: '/www/htdocs'
@@ -82,7 +81,7 @@ function pathinfo(path, options) {
82
81
83
82
// Gather path infos
84
83
if ( options & OPTS . PATHINFO_DIRNAME ) {
85
- var dirName = this . dirname ( path ) ;
84
+ var dirName = path . replace ( / \\ / g , '/' ) . replace ( / \/ [ ^ \/ ] * \/ ? $ / , '' ) ; // dirname
86
85
tmp_arr . dirname = dirName === path ? '.' : dirName ;
87
86
}
88
87
You can’t perform that action at this time.
0 commit comments