mirror of
https://github.com/janet-lang/janet
synced 2024-11-20 15:44:49 +00:00
Merge pull request #354 from andrewchambers/safeclean
Do not recurse into symlinks when cleaning.
This commit is contained in:
commit
13559baecc
@ -267,7 +267,7 @@
|
||||
"Remove a directory and all sub directories."
|
||||
[path]
|
||||
(try
|
||||
(if (= (os/stat path :mode) :directory)
|
||||
(if (= (os/lstat path :mode) :directory)
|
||||
(do
|
||||
(each subpath (os/dir path)
|
||||
(rm (string path sep subpath)))
|
||||
|
Loading…
Reference in New Issue
Block a user