Sometimes some OSs (OS X, Linux, Solaris) report EISDIR when unlinking a file.
This commit is contained in:
parent
f085fa2f90
commit
be129cadc7
|
@ -17,6 +17,7 @@
|
||||||
(or (with-errno-handler ; Assume it's a file and try.
|
(or (with-errno-handler ; Assume it's a file and try.
|
||||||
((err data)
|
((err data)
|
||||||
((errno/perm) #f) ; Return #f if directory
|
((errno/perm) #f) ; Return #f if directory
|
||||||
|
((errno/isdir) #f)
|
||||||
((errno/noent) #t))
|
((errno/noent) #t))
|
||||||
(delete-file fname)
|
(delete-file fname)
|
||||||
#t)
|
#t)
|
||||||
|
|
Loading…
Reference in New Issue