Fix file-responder directory listing problem

darcs
slava 2006-02-06 19:31:54 +00:00
parent e2adf93b62
commit a0b10e42fa
2 changed files with 3 additions and 2 deletions

View File

@ -36,7 +36,7 @@ parser sequences strings ;
] if ;
: serve-directory ( filename -- )
"/" over tail? [
dup "/" tail? [
dup "index.html" append dup exists? [
nip serve-file
] [

View 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 ;