mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
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
This commit is contained in:

committed by
Pavan Koushik Nellore

parent
7a51116243
commit
b364926b9a
@ -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,
|
||||
|
Reference in New Issue
Block a user