Fix parent-directory
parent
8e9ad8cd1a
commit
a20584b47d
|
@ -67,11 +67,11 @@ TUPLE: no-parent-directory path ;
|
||||||
: parent-directory ( path -- parent )
|
: parent-directory ( path -- parent )
|
||||||
trim-path-separators
|
trim-path-separators
|
||||||
dup root-directory? [ ] [
|
dup root-directory? [ ] [
|
||||||
dup last-path-separator drop [
|
dup last-path-separator drop dup [
|
||||||
1+ cut
|
1+ cut
|
||||||
special-directory?
|
special-directory?
|
||||||
[ no-parent-directory ] when
|
[ no-parent-directory ] when
|
||||||
] when*
|
] [ 2drop "." ] if
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: file-name ( path -- string )
|
: file-name ( path -- string )
|
||||||
|
|
Loading…
Reference in New Issue