From 3f088fa824ad782ae3491632c00fec41a5d352bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Mon, 29 Jan 2024 19:48:26 -0500
Subject: [PATCH] TransferManager: create link in proper direction

Change-Id: Iee0494e053a2e897ab1849f5deaeb240f9cc5a6f
---
 src/data_transfer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/data_transfer.cpp b/src/data_transfer.cpp
index f028a31e7f..7cf4d77707 100644
--- a/src/data_transfer.cpp
+++ b/src/data_transfer.cpp
@@ -567,7 +567,7 @@ TransferManager::onIncomingProfile(const std::shared_ptr<dhtnet::ChannelSocket>&
                         std::filesystem::rename(path, destPath);
                         if (!pimpl->accountUri_.empty() && uri == pimpl->accountUri_) {
                             // If this is the account profile, link or copy it to the account profile path
-                            if (!fileutils::createFileLink(destPath, pimpl->accountProfilePath_)) {
+                            if (!fileutils::createFileLink(pimpl->accountProfilePath_, destPath)) {
                                 std::error_code ec;
                                 std::filesystem::copy_file(destPath, pimpl->accountProfilePath_, ec);
                             }
-- 
GitLab