From 62f652a5a1ca3b9f89015727d787d359bbbe9d34 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sat, 12 Nov 2011 18:27:33 -0800 Subject: [PATCH] io.directories: fix delete-file on windows, add unit test --- basis/io/directories/directories-tests.factor | 3 +++ basis/io/directories/windows/windows.factor | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/basis/io/directories/directories-tests.factor b/basis/io/directories/directories-tests.factor index b703421b45..19d6d8e548 100644 --- a/basis/io/directories/directories-tests.factor +++ b/basis/io/directories/directories-tests.factor @@ -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 \ No newline at end of file diff --git a/basis/io/directories/windows/windows.factor b/basis/io/directories/windows/windows.factor index b02f8731f5..68c7a5bd07 100644 --- a/basis/io/directories/windows/windows.factor +++ b/basis/io/directories/windows/windows.factor @@ -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 ;