1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-27 14:48:13 +00:00

Do not recurse into symlinks when cleaning.

This commit is contained in:
Andrew Chambers 2020-04-21 15:11:51 +12:00
parent 9b5c6112e5
commit e1b6175efd

View File

@ -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)))