File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Original file line number Diff line number Diff line change 98
98
if ( ! parts || parts . length == 0 ) {
99
99
return callback ( current ) ;
100
100
}
101
- if ( ! parts [ 0 ] ) {
102
- current = root ;
103
- } else if ( parts [ 0 ] == "." ) {
101
+ if ( parts [ 0 ] == "." ) {
104
102
// carry on
105
103
} else if ( parts [ 0 ] == ".." ) {
106
104
current = current . parent ;
132
130
return callback ( pathhandler . current ) ;
133
131
}
134
132
var parts = _ . filter ( path . split ( '/' ) , function ( x ) { return x ; } ) ;
135
- console . log ( JSON . stringify ( parts ) ) ;
136
- return findNode ( pathhandler . current , parts , callback ) ;
133
+ var start = ( ( path || '' ) [ 0 ] == '/' ) ? root :
134
+ console . log ( 'start: ' + start . path + ', parts: ' + JSON . stringify ( parts ) ) ;
135
+ return findNode ( start , parts , callback ) ;
137
136
} ;
138
137
pathhandler . getChildNodes = function ( node , callback ) {
139
138
console . log ( "children for " + node . name ) ;
You can’t perform that action at this time.
0 commit comments