Fix parent-directory on /
parent
a74bf88d9e
commit
6f19e210b3
|
@ -66,12 +66,14 @@ TUPLE: no-parent-directory path ;
|
||||||
|
|
||||||
: parent-directory ( path -- parent )
|
: parent-directory ( path -- parent )
|
||||||
trim-path-separators
|
trim-path-separators
|
||||||
dup root-directory? [ ] [
|
dup empty? [ drop "/" ] [
|
||||||
dup last-path-separator drop [
|
dup root-directory? [ ] [
|
||||||
1+ cut
|
dup last-path-separator drop [
|
||||||
special-directory?
|
1+ cut
|
||||||
[ no-parent-directory ] when
|
special-directory?
|
||||||
] when*
|
[ no-parent-directory ] when
|
||||||
|
] when*
|
||||||
|
] if
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: file-name ( path -- string )
|
: file-name ( path -- string )
|
||||||
|
|
Loading…
Reference in New Issue