mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 00:35:26 +00:00
os: use unlink() to remove file (#9220)
removeFile() behavior should now be consistant between Windows and POSIX Fixes #9200
This commit is contained in:
@@ -39,6 +39,7 @@ false
|
||||
true
|
||||
true
|
||||
Raises
|
||||
Raises
|
||||
true
|
||||
true
|
||||
true
|
||||
@@ -119,6 +120,14 @@ except IOError:
|
||||
echo "Raises"
|
||||
removeFile(dname)
|
||||
|
||||
# removeFile should not remove directory
|
||||
createDir(dname)
|
||||
try:
|
||||
removeFile(dname)
|
||||
except OSError:
|
||||
echo "Raises"
|
||||
removeDir(dname)
|
||||
|
||||
# test copyDir:
|
||||
createDir("a/b")
|
||||
open("a/b/file.txt", fmWrite).close
|
||||
|
||||
Reference in New Issue
Block a user