Fix file-responder directory listing problem
parent
e2adf93b62
commit
a0b10e42fa
|
|
@ -36,7 +36,7 @@ parser sequences strings ;
|
|||
] if ;
|
||||
|
||||
: serve-directory ( filename -- )
|
||||
"/" over tail? [
|
||||
dup "/" tail? [
|
||||
dup "index.html" append dup exists? [
|
||||
nip serve-file
|
||||
] [
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ styles ;
|
|||
|
||||
! Words for accessing filesystem meta-data.
|
||||
|
||||
: path+ ( path path -- path ) "/" swap append3 ;
|
||||
: path+ ( path path -- path )
|
||||
over "/" tail? [ append ] [ "/" swap append3 ] if ;
|
||||
|
||||
: exists? ( file -- ? ) stat >boolean ;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue