From b364926b9acac112ba226e97ee5e9c8bc9cfffe0 Mon Sep 17 00:00:00 2001 From: pknellore Date: Tue, 6 May 2025 17:19:44 -0400 Subject: [PATCH] filetransfer: skip symlink deletion During file transfer, incoming requests may see symlinks as unresolved paths and incorrectly delete them. This logic is removed to prevent breaking ongoing transfers. Change-Id: I800e7f146d5e5ea2cbf94aed38e1bc8e646747c2 --- src/jamidht/conversation_module.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/jamidht/conversation_module.cpp b/src/jamidht/conversation_module.cpp index c80b32209..7d1f4b26c 100644 --- a/src/jamidht/conversation_module.cpp +++ b/src/jamidht/conversation_module.cpp @@ -2379,10 +2379,6 @@ ConversationModule::onFileChannelRequest(const std::string& conversationId, // Release the lock here to prevent the sha3 calculation from blocking other threads. lk.unlock(); if (!std::filesystem::is_regular_file(path)) { - // Check if dangling symlink - if (std::filesystem::is_symlink(path)) { - dhtnet::fileutils::remove(path, true); - } JAMI_WARNING("[Account {:s}] [Conversation {}] {:s} asked for non existing file {}", pimpl_->accountId_, conversationId,