1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-27 07:34:44 +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." "Remove a directory and all sub directories."
[path] [path]
(try (try
(if (= (os/stat path :mode) :directory) (if (= (os/lstat path :mode) :directory)
(do (do
(each subpath (os/dir path) (each subpath (os/dir path)
(rm (string path sep subpath))) (rm (string path sep subpath)))