io.directories: fix delete-file on windows, add unit test

db4
Doug Coleman 2011-11-12 18:27:33 -08:00
parent 00280a52a4
commit 62f652a5a1
2 changed files with 4 additions and 1 deletions
basis/io/directories

View File

@ -187,3 +187,6 @@ IN: io.directories.tests
[ ] [ "copy-destination" temp-file delete-tree ] unit-test
[ ] [ "copy-tree-test" temp-file delete-tree ] unit-test
[ ] [ "resource:deleteme" touch-file ] unit-test
[ ] [ "resource:deleteme" delete-file ] unit-test

View File

@ -32,7 +32,7 @@ ERROR: file-delete-failed path error ;
] [ drop ] if ;
M: windows delete-file ( path -- )
normalize-path
absolute-path
[ (delete-file) ]
[ \ file-delete-failed boa rethrow ] recover ;