From 651f49fc90fd7cda121bb1d83ff62022e6ef4c65 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 5 Jan 2023 16:46:39 +0300 Subject: [PATCH] Delete symbolic links in rmrf. --- tdutils/td/utils/port/path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tdutils/td/utils/port/path.cpp b/tdutils/td/utils/port/path.cpp index 744d706d0..1c93cf32d 100644 --- a/tdutils/td/utils/port/path.cpp +++ b/tdutils/td/utils/port/path.cpp @@ -95,7 +95,8 @@ Status rmrf(CSlice path) { unlink(path).ignore(); break; case WalkPath::Type::Symlink: - // never follow symbolic links + // never follow symbolic links, but delete the link themselves + unlink(path).ignore(); break; } });