io.directories: fix delete-file on windows, add unit test
							parent
							
								
									00280a52a4
								
							
						
					
					
						commit
						62f652a5a1
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -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 ;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue