From 24ffc1ffb240d2e6b0ac9dbc88f265c35bfe3678 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 20 Nov 2021 10:24:18 +0200 Subject: [PATCH] os: fix os.rmdir_all for folders with recursive symlinks --- vlib/os/os.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index 77b26e8544..8632040b8e 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -135,7 +135,7 @@ pub fn rmdir_all(path string) ? { items := ls(path) ? for item in items { fullpath := join_path(path, item) - if is_dir(fullpath) { + if is_dir(fullpath) && !is_link(fullpath) { rmdir_all(fullpath) or { ret_err = err.msg } } else { rm(fullpath) or { ret_err = err.msg }