Skip to content
Snippets Groups Projects
Commit b364926b authored by Pavan Koushik Nellore's avatar Pavan Koushik Nellore Committed by Pavan Koushik Nellore
Browse files

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
parent 7a511162
No related branches found
No related tags found
No related merge requests found
...@@ -2379,10 +2379,6 @@ ConversationModule::onFileChannelRequest(const std::string& conversationId, ...@@ -2379,10 +2379,6 @@ ConversationModule::onFileChannelRequest(const std::string& conversationId,
// Release the lock here to prevent the sha3 calculation from blocking other threads. // Release the lock here to prevent the sha3 calculation from blocking other threads.
lk.unlock(); lk.unlock();
if (!std::filesystem::is_regular_file(path)) { 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 {}", JAMI_WARNING("[Account {:s}] [Conversation {}] {:s} asked for non existing file {}",
pimpl_->accountId_, pimpl_->accountId_,
conversationId, conversationId,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment