From 995ed044e1a2153e09c31bd9ef399b15194564dd Mon Sep 17 00:00:00 2001 From: taynpg Date: Thu, 10 Jul 2025 18:44:09 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9Arecovery=20permissions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 2 +- ClientCore/FileTrans.cpp | 1 + Util/LocalFile.cpp | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5299679..6e3c53c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(frelay VERSION 0.2.1 LANGUAGES CXX) +project(frelay VERSION 0.2.2 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/ClientCore/FileTrans.cpp b/ClientCore/FileTrans.cpp index ff190bb..1d97b2a 100644 --- a/ClientCore/FileTrans.cpp +++ b/ClientCore/FileTrans.cpp @@ -238,6 +238,7 @@ void FileTrans::fbtTransDone(QSharedPointer frame) { auto info = infoUnpack(frame->data); if (downTask_->file.isOpen()) { + downTask_->file.setPermissions(static_cast(downTask_->permission)); downTask_->file.close(); downTask_->state = TaskState::STATE_FINISH; info.msg = QString(tr("recv file:%1 success.")).arg(downTask_->file.fileName()); diff --git a/Util/LocalFile.cpp b/Util/LocalFile.cpp index 9c4f47e..29eadc5 100644 --- a/Util/LocalFile.cpp +++ b/Util/LocalFile.cpp @@ -47,6 +47,7 @@ bool LocalFile::GetDirFile(const QString& dir, DirFileInfoVec& vec) DirFileInfo info; info.fullPath = entry.absoluteFilePath(); info.name = entry.fileName(); + info.permission = entry.permissions(); if (entry.isDir()) { info.type = Dir;