diff --git a/libfm-qt-0.14.1/src/foldermodel.cpp b/libfm-qt-0.14.1/src/foldermodel.cpp index b115ded32c721a85aa34bbc21aa417b292e709d6..eac606d936412926a58140ca94fe7d51a81e23fc 100644 --- a/libfm-qt-0.14.1/src/foldermodel.cpp +++ b/libfm-qt-0.14.1/src/foldermodel.cpp @@ -31,6 +31,8 @@ #include #include "utilities.h" #include +#include + namespace Fm { FolderModel::FolderModel(): @@ -525,8 +527,30 @@ bool FolderModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int updateFolderByOp(op, srcPaths, destPath); break; case Qt::MoveAction: - op = FileOperation::moveFiles(srcPaths, destPath); - updateFolderByOp(op, srcPaths, destPath); + { + Fm::FilePathList copyPaths; + Fm::FilePathList movePaths; + QString desktop_path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + for(auto& item: srcPaths) { + QString path = item.localPath().get(); + if(isUserfile(path)) + { + copyPaths.push_back(item); + } + else { + movePaths.push_back(item); + } + } + if(!copyPaths.empty()) + { + op = FileOperation::copyFiles(copyPaths, destPath); + updateFolderByOp(op, copyPaths, destPath); + } + if(!movePaths.empty()) + { + op = FileOperation::moveFiles(movePaths, destPath); + updateFolderByOp(op, movePaths, destPath); + } break; case Qt::LinkAction: FileOperation::symlinkFiles(srcPaths, destPath); diff --git a/libfm-qt.spec b/libfm-qt.spec index baa5fe469c148b13b980e9b069a0816b202305e6..a11917945088ef6453287ec5d12fe2fe498bba39 100644 --- a/libfm-qt.spec +++ b/libfm-qt.spec @@ -1,6 +1,6 @@ Name: libfm-qt Version: 0.14.1 -Release: 195%{?dist} +Release: 196%{?dist} Summary: Companion library for PCManFM License: GPLv2+ URL: http://www.gd-linux.com @@ -129,6 +129,9 @@ sed -i "s/Requires:.*/Requires: Qt5Widgets Qt5X11Extras/" %{buildroot}/%{_libdir %dir %{_datadir}/libfm-qt/translations %changelog +* Tue Sep 28 2021 Wu Shangmin - 0.14.1-196 +- 拖动用户目录下的默认文件夹到其他路径时以copy的形式而不是以move形式 + * Mon Sep 27 2021 Li Shengsong - 0.14.1-195 - 磁盘挂载点多国语言支持(#4240)