Compare commits
No commits in common. 'ubuntu/plucky' and 'ubuntu/focal' have entirely different histories.
ubuntu/plu
...
ubuntu/foc
@ -0,0 +1,10 @@
|
|||||||
|
usr/include/libfm-qt/*.h
|
||||||
|
usr/include/libfm-qt/customactions/*.h
|
||||||
|
usr/include/libfm-qt/core/*.h
|
||||||
|
usr/include/libfm-qt/core/legacy/*.h
|
||||||
|
usr/include/libfm-qt/core/vfs/*.h
|
||||||
|
|
||||||
|
usr/lib/*/*.so
|
||||||
|
usr/lib/*/pkgconfig/*
|
||||||
|
|
||||||
|
usr/share/cmake/fm-qt/*.cmake
|
@ -0,0 +1 @@
|
|||||||
|
usr/share/libfm-qt/translations
|
@ -1 +0,0 @@
|
|||||||
usr/lib/*/*.so.*
|
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
|||||||
usr/share/libfm-qt6/archivers.list
|
|
||||||
usr/share/libfm-qt6/terminals.list
|
|
||||||
usr/share/mime/packages/libfm-qt6-mimetypes.xml
|
|
@ -1,8 +0,0 @@
|
|||||||
usr/include/libfm-qt6/*.h
|
|
||||||
usr/include/libfm-qt6/core/*.h
|
|
||||||
usr/include/libfm-qt6/core/legacy/*.h
|
|
||||||
usr/include/libfm-qt6/core/vfs/*.h
|
|
||||||
usr/include/libfm-qt6/customactions/*.h
|
|
||||||
usr/lib/*/*.so
|
|
||||||
usr/lib/*/pkgconfig/*
|
|
||||||
usr/share/cmake/fm-qt6/*.cmake
|
|
@ -1 +0,0 @@
|
|||||||
usr/share/libfm-qt6/translations
|
|
@ -0,0 +1,4 @@
|
|||||||
|
usr/lib/*/*.so.*
|
||||||
|
usr/share/libfm-qt/terminals.list
|
||||||
|
usr/share/libfm-qt/archivers.list
|
||||||
|
usr/share/mime/packages/libfm-qt-mimetypes.xml
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,115 @@
|
|||||||
|
From 7e79e591eb536603da92ee537bf949490b1259fc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tsu Jan <tsujan2000@gmail.com>
|
||||||
|
Date: Sun, 21 Apr 2019 14:11:14 +0430
|
||||||
|
Subject: [PATCH] Don't ignore creation-deletion sequences
|
||||||
|
|
||||||
|
Fixes https://github.com/lxqt/pcmanfm-qt/issues/944
|
||||||
|
|
||||||
|
Previously, if a file was in addition queue and then it came into the deletion
|
||||||
|
queue, its addition and deletion were both ignored. That was wrong and could
|
||||||
|
result in showing nonexistent files because addition can also happen in
|
||||||
|
directory list job before being processed by file info job.
|
||||||
|
|
||||||
|
Also process accumulated changes only after finishing the current info job and
|
||||||
|
don't clear all deletion paths after processing them (because, logically, only
|
||||||
|
those paths that can be deleted should be removed).
|
||||||
|
---
|
||||||
|
src/core/folder.cpp | 60 +++++++++++++++++++++++----------------------
|
||||||
|
1 file changed, 31 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/folder.cpp b/src/core/folder.cpp
|
||||||
|
index 6c2b27d..2385a8b 100644
|
||||||
|
--- a/src/core/folder.cpp
|
||||||
|
+++ b/src/core/folder.cpp
|
||||||
|
@@ -228,16 +228,6 @@ void Folder::onFileInfoFinished() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- // process the changes accumulated during this info job
|
||||||
|
- if(filesystem_info_pending // means a pending change; see "onFileSystemInfoFinished()"
|
||||||
|
- || !paths_to_update.empty() || !paths_to_add.empty() || !paths_to_del.empty()) {
|
||||||
|
- QTimer::singleShot(0, this, &Folder::processPendingChanges);
|
||||||
|
- }
|
||||||
|
- // there's no pending change at the moment; let the next one be processed
|
||||||
|
- else {
|
||||||
|
- has_idle_update_handler = false;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
FileInfoList files_to_add;
|
||||||
|
FileInfoList files_to_delete;
|
||||||
|
std::vector<FileInfoPair> files_to_update;
|
||||||
|
@@ -271,6 +261,16 @@ void Folder::onFileInfoFinished() {
|
||||||
|
Q_EMIT filesChanged(files_to_update);
|
||||||
|
}
|
||||||
|
Q_EMIT contentChanged();
|
||||||
|
+
|
||||||
|
+ // process the changes accumulated during this info job
|
||||||
|
+ if(filesystem_info_pending // means a pending change; see "onFileSystemInfoFinished()"
|
||||||
|
+ || !paths_to_update.empty() || !paths_to_add.empty() || !paths_to_del.empty()) {
|
||||||
|
+ QTimer::singleShot(0, this, &Folder::processPendingChanges);
|
||||||
|
+ }
|
||||||
|
+ // there's no pending change at the moment; let the next one be processed
|
||||||
|
+ else {
|
||||||
|
+ has_idle_update_handler = false;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void Folder::processPendingChanges() {
|
||||||
|
@@ -314,21 +314,24 @@ void Folder::processPendingChanges() {
|
||||||
|
}
|
||||||
|
|
||||||
|
// process deletion
|
||||||
|
- if(!paths_to_del.empty()) {
|
||||||
|
- FileInfoList deleted_files;
|
||||||
|
- for(const auto &path: paths_to_del) {
|
||||||
|
- auto name = path.baseName();
|
||||||
|
- auto it = files_.find(name.get());
|
||||||
|
- if(it != files_.end()) {
|
||||||
|
- deleted_files.push_back(it->second);
|
||||||
|
- files_.erase(it);
|
||||||
|
- }
|
||||||
|
+ FileInfoList deleted_files;
|
||||||
|
+ auto path_it = paths_to_del.begin();
|
||||||
|
+ while(path_it != paths_to_del.end()) {
|
||||||
|
+ const auto& path = *path_it;
|
||||||
|
+ auto name = path.baseName();
|
||||||
|
+ auto it = files_.find(name.get());
|
||||||
|
+ if(it != files_.end()) {
|
||||||
|
+ deleted_files.push_back(it->second);
|
||||||
|
+ files_.erase(it);
|
||||||
|
+ path_it = paths_to_del.erase(path_it);
|
||||||
|
}
|
||||||
|
- if(!deleted_files.empty()) {
|
||||||
|
- Q_EMIT filesRemoved(deleted_files);
|
||||||
|
- Q_EMIT contentChanged();
|
||||||
|
+ else {
|
||||||
|
+ ++path_it;
|
||||||
|
}
|
||||||
|
- paths_to_del.clear();
|
||||||
|
+ }
|
||||||
|
+ if(!deleted_files.empty()) {
|
||||||
|
+ Q_EMIT filesRemoved(deleted_files);
|
||||||
|
+ Q_EMIT contentChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pending_change_notify) {
|
||||||
|
@@ -404,13 +407,12 @@ void Folder::eventFileDeleted(const FilePath& path) {
|
||||||
|
bool deleted = true;
|
||||||
|
// qDebug() << "delete " << path.baseName().get();
|
||||||
|
// G_LOCK(lists);
|
||||||
|
- if(std::find(paths_to_add.cbegin(), paths_to_add.cend(), path) != paths_to_add.cend()) {
|
||||||
|
- // if the file was going to be added, just remove it from the addition queue
|
||||||
|
- paths_to_add.erase(std::remove(paths_to_add.begin(), paths_to_add.end(), path), paths_to_add.cend());
|
||||||
|
- }
|
||||||
|
- else if(std::find(paths_to_del.cbegin(), paths_to_del.cend(), path) == paths_to_del.cend()) {
|
||||||
|
+ /* WARNING: If the file is in the addition queue, we shouldn not remove it from that queue
|
||||||
|
+ and ignore its deletion because it may have been added by the directory list job, in
|
||||||
|
+ which case, ignoring an addition-deletion sequence would result in a nonexistent file. */
|
||||||
|
+ if(std::find(paths_to_del.cbegin(), paths_to_del.cend(), path) == paths_to_del.cend()) {
|
||||||
|
paths_to_del.push_back(path);
|
||||||
|
- // the update queue should be cancelled for a file that is going to be deleted
|
||||||
|
+ // the update queue can be cancelled for a file that is going to be deleted
|
||||||
|
paths_to_update.erase(std::remove(paths_to_update.begin(), paths_to_update.end(), path), paths_to_update.cend());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
Description: Fix DND for MTP mounted folders
|
||||||
|
Author: Tsu Jan <tsujan2000@gmail.com>
|
||||||
|
Bug-Upstream: https://github.com/lxqt/pcmanfm-qt/issues/301
|
||||||
|
Applied-Upstream: https://github.com/lxqt/libfm-qt/commit/7de18bc89b9b47f66de54a7e347bf8d391d44a48
|
||||||
|
Last-Update: 2019-08-17
|
||||||
|
--- a/src/foldermodel.cpp
|
||||||
|
+++ b/src/foldermodel.cpp
|
||||||
|
@@ -384,7 +384,7 @@ QStringList FolderModel::mimeTypes() con
|
||||||
|
// the real implementation is in FolderView::childDropEvent().
|
||||||
|
types << "XdndDirectSave0";
|
||||||
|
types << "text/uri-list";
|
||||||
|
- // types << "x-special/gnome-copied-files";
|
||||||
|
+ types << QStringLiteral("libfm/files"); // see FolderModel::mimeData() below
|
||||||
|
return types;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -407,6 +407,9 @@ QMimeData* FolderModel::mimeData(const Q
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data->setData("text/uri-list", urilist);
|
||||||
|
+ // NOTE: The mimetype "text/uri-list" changes the list in QMimeData::setData() to get URLs
|
||||||
|
+ // but some protocols (like MTP) may need the original list to query file info.
|
||||||
|
+ data->setData(QStringLiteral("libfm/files"), urilist);
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
@@ -442,10 +445,19 @@ bool FolderModel::dropMimeData(const QMi
|
||||||
|
destPath = path();
|
||||||
|
}
|
||||||
|
|
||||||
|
+ Fm::FilePathList srcPaths;
|
||||||
|
+ // try to get paths from the original data
|
||||||
|
+ if(data->hasFormat(QStringLiteral("libfm/files"))) {
|
||||||
|
+ QByteArray _data = data->data(QStringLiteral("libfm/files"));
|
||||||
|
+ srcPaths = pathListFromUriList(_data.data());
|
||||||
|
+ }
|
||||||
|
+ if(srcPaths.empty() && data->hasUrls()) {
|
||||||
|
+ srcPaths = Fm::pathListFromQUrls(data->urls());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
// FIXME: should we put this in dropEvent handler of FolderView instead?
|
||||||
|
- if(data->hasUrls()) {
|
||||||
|
+ if(!srcPaths.empty()) {
|
||||||
|
//qDebug("drop action: %d", action);
|
||||||
|
- auto srcPaths = pathListFromQUrls(data->urls());
|
||||||
|
switch(action) {
|
||||||
|
case Qt::CopyAction:
|
||||||
|
FileOperation::copyFiles(srcPaths, destPath);
|
||||||
|
|
@ -0,0 +1,97 @@
|
|||||||
|
From 3d23ec7f0857cbc1ae8e42bdd27ab179a7e8344f Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Hong Jen Yee (PCMan)" <pcman.tw@gmail.com>
|
||||||
|
Date: Fri, 19 Apr 2019 01:19:08 +0800
|
||||||
|
Subject: [PATCH] Fix the license header of code we took from libfm (they
|
||||||
|
should use LGPL2 instead of GPL2). - src/core/vfs/vfs-menu.c -
|
||||||
|
src/core/vfs/vfs-search.c These files are taken from libfm which has been
|
||||||
|
relicensed to LGPL 2 on 2014-09-05 by Andrey N. Gritsenko after consulting
|
||||||
|
other contributors.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/core/vfs/vfs-menu.c | 21 ++++++++++-----------
|
||||||
|
src/core/vfs/vfs-search.c | 37 +++++++++++++++++--------------------
|
||||||
|
2 files changed, 27 insertions(+), 31 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/vfs/vfs-menu.c b/src/core/vfs/vfs-menu.c
|
||||||
|
index c541159..069b1bc 100644
|
||||||
|
--- a/src/core/vfs/vfs-menu.c
|
||||||
|
+++ b/src/core/vfs/vfs-menu.c
|
||||||
|
@@ -4,20 +4,19 @@
|
||||||
|
*
|
||||||
|
* Copyright 2012-2014 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
|
||||||
|
*
|
||||||
|
- * This program is free software; you can redistribute it and/or modify
|
||||||
|
- * it under the terms of the GNU General Public License as published by
|
||||||
|
- * the Free Software Foundation; either version 2 of the License, or
|
||||||
|
- * (at your option) any later version.
|
||||||
|
+ * This library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ * License as published by the Free Software Foundation; either
|
||||||
|
+ * version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
- * This program is distributed in the hope that it will be useful,
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
- * GNU General Public License for more details.
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ * Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
- * You should have received a copy of the GNU General Public License
|
||||||
|
- * along with this program; if not, write to the Free Software
|
||||||
|
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
- * MA 02110-1301, USA.
|
||||||
|
+ * You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ * License along with this library; if not, write to the Free Software
|
||||||
|
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
diff --git a/src/core/vfs/vfs-search.c b/src/core/vfs/vfs-search.c
|
||||||
|
index 0a64fb6..92b932c 100644
|
||||||
|
--- a/src/core/vfs/vfs-search.c
|
||||||
|
+++ b/src/core/vfs/vfs-search.c
|
||||||
|
@@ -1,25 +1,22 @@
|
||||||
|
/*
|
||||||
|
- * fm-vfs-search.c
|
||||||
|
- *
|
||||||
|
- * Copyright 2012 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||||
|
- * Copyright 2010 Shae Smittle <starfall87@gmail.com>
|
||||||
|
- *
|
||||||
|
- * This program is free software; you can redistribute it and/or modify
|
||||||
|
- * it under the terms of the GNU General Public License as published by
|
||||||
|
- * the Free Software Foundation; either version 2 of the License, or
|
||||||
|
- * (at your option) any later version.
|
||||||
|
- *
|
||||||
|
- * This program is distributed in the hope that it will be useful,
|
||||||
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
- * GNU General Public License for more details.
|
||||||
|
- *
|
||||||
|
- * You should have received a copy of the GNU General Public License
|
||||||
|
- * along with this program; if not, write to the Free Software
|
||||||
|
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
- * MA 02110-1301, USA.
|
||||||
|
- *
|
||||||
|
+ * fm-vfs-search.c
|
||||||
|
*
|
||||||
|
+ * Copyright 2012 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
|
||||||
|
+ * Copyright 2010 Shae Smittle <starfall87@gmail.com>
|
||||||
|
+ *
|
||||||
|
+ * This library is free software; you can redistribute it and/or
|
||||||
|
+ * modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ * License as published by the Free Software Foundation; either
|
||||||
|
+ * version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This library is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ * Lesser General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ * License along with this library; if not, write to the Free Software
|
||||||
|
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
From 6cb5f38d2c1261b782b16da45bb323b069db94fe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tsu Jan <tsujan2000@gmail.com>
|
||||||
|
Date: Mon, 8 Apr 2019 07:13:09 +0430
|
||||||
|
Subject: [PATCH] Fixed SMB recursive copy
|
||||||
|
|
||||||
|
Fixes https://github.com/lxqt/libfm-qt/issues/385 by trying to set dir permissions only once and ignoring possible errors (that happen with SMB and, maybe, other protocols).
|
||||||
|
---
|
||||||
|
src/core/filetransferjob.cpp | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/core/filetransferjob.cpp b/src/core/filetransferjob.cpp
|
||||||
|
index 4039c58..6b44576 100644
|
||||||
|
--- a/src/core/filetransferjob.cpp
|
||||||
|
+++ b/src/core/filetransferjob.cpp
|
||||||
|
@@ -279,16 +279,17 @@ bool FileTransferJob::makeDir(const FilePath& srcPath, GFileInfoPtr srcInfo, Fil
|
||||||
|
mode, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
|
||||||
|
cancellable().get(), &err);
|
||||||
|
if(!chmod_done) {
|
||||||
|
- ErrorAction act = emitError(err, ErrorSeverity::MODERATE);
|
||||||
|
+ /* NOTE: Some filesystems may not support this. So, ignore errors for now. */
|
||||||
|
+ break;
|
||||||
|
+ /*ErrorAction act = emitError(err, ErrorSeverity::MODERATE);
|
||||||
|
if(act != ErrorAction::RETRY) {
|
||||||
|
break;
|
||||||
|
- }
|
||||||
|
- /* FIXME: some filesystems may not support this. */
|
||||||
|
+ }*/
|
||||||
|
}
|
||||||
|
} while(!chmod_done && !isCancelled());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- return mkdir_done && chmod_done;
|
||||||
|
+ return mkdir_done/* && chmod_done*/;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool FileTransferJob::handleError(GErrorPtr &err, const FilePath &srcPath, const GFileInfoPtr &srcInfo, FilePath &destPath, int& flags) {
|
@ -1 +1,7 @@
|
|||||||
fix-metadata-for-trusting-executables.patch
|
fix-metadata-for-trusting-executables.patch
|
||||||
|
fix-smb-recursive-copy.patch
|
||||||
|
fix-license-headers.patch
|
||||||
|
dont-ignore-crea-del-sequences.patch
|
||||||
|
workaround-glib-recursive-moving-error.patch
|
||||||
|
workaround-missed-file-monitoring.patch
|
||||||
|
fix-dnd-mtp.patch
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
From 476dded99de11a57c64103b4610f0de3dbdbc769 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tsu Jan <tsujan2000@gmail.com>
|
||||||
|
Date: Mon, 22 Apr 2019 00:07:07 +0430
|
||||||
|
Subject: [PATCH] Workaround for GLib's recursive moving error, e.g. with bound
|
||||||
|
mounts
|
||||||
|
|
||||||
|
`g_file_move()` may not work recursively on the same filesystem, especially
|
||||||
|
with bound mounts (to `/mnt`, for example) and give the `G_IO_ERROR_WOULD_RECURSE`
|
||||||
|
error. This patch ignores the error and tries our `FileTransferJob::copyFile()`.
|
||||||
|
|
||||||
|
Closes https://github.com/lxqt/pcmanfm-qt/issues/943
|
||||||
|
---
|
||||||
|
src/core/filetransferjob.cpp | 7 +++++++
|
||||||
|
1 file changed, 7 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/core/filetransferjob.cpp b/src/core/filetransferjob.cpp
|
||||||
|
index c3d5851..32f0f89 100644
|
||||||
|
--- a/src/core/filetransferjob.cpp
|
||||||
|
+++ b/src/core/filetransferjob.cpp
|
||||||
|
@@ -83,6 +83,13 @@ bool FileTransferJob::moveFileSameFs(const FilePath& srcPath, const GFileInfoPtr
|
||||||
|
// do the file operation
|
||||||
|
if(!g_file_move(srcPath.gfile().get(), destPath.gfile().get(), GFileCopyFlags(flags), cancellable().get(),
|
||||||
|
nullptr, this, &err)) {
|
||||||
|
+ // Specially with mounts bound to /mnt, g_file_move() may give the recursive error
|
||||||
|
+ // and fail, in which case, we ignore the error and try copying and deleting.
|
||||||
|
+ if(err.code() == G_IO_ERROR_WOULD_RECURSE) {
|
||||||
|
+ if(auto parent = destPath.parent()) {
|
||||||
|
+ return copyFile(srcPath, srcInfo, parent, destPath.baseName().get());
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
retry = handleError(err, srcPath, srcInfo, destPath, flags);
|
||||||
|
}
|
||||||
|
else {
|
@ -0,0 +1,143 @@
|
|||||||
|
Description: Realod folder after transfer job if it lacks file monitoring
|
||||||
|
Closes https://github.com/lxqt/pcmanfm-qt/issues/933 and closes
|
||||||
|
https://github.com/lxqt/libfm-qt/issues/280. After a file transfer job is
|
||||||
|
finished inside a directory, if it is the path of an open folder that lacks
|
||||||
|
file monitoring, this patch reloads its corresponding folder. In this way, the
|
||||||
|
lack of file monitoring is partially compensated for.
|
||||||
|
Please note that this doesn't work with `search://` because the files inside
|
||||||
|
`search://` don't belong to it. By covering file creation, renaming, moving
|
||||||
|
from one shared folder to another and deleting after trying to move into Trash.
|
||||||
|
|
||||||
|
Last-Update: 2019-06-08
|
||||||
|
|
||||||
|
--- libfm-qt-0.14.1.orig/src/core/folder.cpp
|
||||||
|
+++ libfm-qt-0.14.1/src/core/folder.cpp
|
||||||
|
@@ -112,6 +112,20 @@ std::shared_ptr<Folder> Folder::fromPath
|
||||||
|
return folder;
|
||||||
|
}
|
||||||
|
|
||||||
|
+// static
|
||||||
|
+// Checks if this is the path of a folder in use.
|
||||||
|
+std::shared_ptr<Folder> Folder::findByPath(const FilePath& path) {
|
||||||
|
+ std::lock_guard<std::mutex> lock{mutex_};
|
||||||
|
+ auto it = cache_.find(path);
|
||||||
|
+ if(it != cache_.end()) {
|
||||||
|
+ auto folder = it->second.lock();
|
||||||
|
+ if(folder) {
|
||||||
|
+ return folder;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return nullptr;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool Folder::makeDirectory(const char* /*name*/, GError** /*error*/) {
|
||||||
|
// TODO:
|
||||||
|
// FIXME: what the API is used for in the original libfm C API?
|
||||||
|
@@ -142,6 +156,10 @@ bool Folder::isEmpty() const {
|
||||||
|
return files_.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool Folder::hasFileMonitor() const {
|
||||||
|
+ return (dirMonitor_ != nullptr);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
FileInfoList Folder::files() const {
|
||||||
|
FileInfoList ret;
|
||||||
|
ret.reserve(files_.size());
|
||||||
|
--- libfm-qt-0.14.1.orig/src/core/folder.h
|
||||||
|
+++ libfm-qt-0.14.1/src/core/folder.h
|
||||||
|
@@ -56,6 +56,8 @@ public:
|
||||||
|
|
||||||
|
static std::shared_ptr<Folder> fromPath(const FilePath& path);
|
||||||
|
|
||||||
|
+ static std::shared_ptr<Folder> findByPath(const FilePath& path);
|
||||||
|
+
|
||||||
|
bool makeDirectory(const char* name, GError** error);
|
||||||
|
|
||||||
|
void queryFilesystemInfo();
|
||||||
|
@@ -74,6 +76,8 @@ public:
|
||||||
|
|
||||||
|
bool isEmpty() const;
|
||||||
|
|
||||||
|
+ bool hasFileMonitor() const;
|
||||||
|
+
|
||||||
|
FileInfoList files() const;
|
||||||
|
|
||||||
|
const FilePath& path() const;
|
||||||
|
--- libfm-qt-0.14.1.orig/src/fileoperation.cpp
|
||||||
|
+++ libfm-qt-0.14.1/src/fileoperation.cpp
|
||||||
|
@@ -298,6 +298,8 @@ void FileOperation::onJobFinish() {
|
||||||
|
}
|
||||||
|
Q_EMIT finished();
|
||||||
|
|
||||||
|
+ bool tryReload = true;
|
||||||
|
+
|
||||||
|
// special handling for trash job
|
||||||
|
if(type_ == Trash && !job_->isCancelled()) {
|
||||||
|
auto trashJob = static_cast<Fm::TrashJob*>(job_);
|
||||||
|
@@ -313,6 +315,26 @@ void FileOperation::onJobFinish() {
|
||||||
|
"Do you want to delete them instead?")) == QMessageBox::Yes) {
|
||||||
|
deleteFiles(std::move(unsupportedFiles), false);
|
||||||
|
}
|
||||||
|
+ tryReload = false;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ // reload the containing folder if it is in use but does not have a file monitor
|
||||||
|
+ if(tryReload) {
|
||||||
|
+ if(!srcPaths_.empty() && (type_ == Trash || type_ == Delete || type_ == Move)) {
|
||||||
|
+ auto parent_path = srcPaths_[0].parent();
|
||||||
|
+ if(parent_path != destPath_) { // otherwise, it will be done below
|
||||||
|
+ auto folder = Fm::Folder::findByPath(parent_path);
|
||||||
|
+ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
|
||||||
|
+ folder->reload();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if(destPath_) {
|
||||||
|
+ auto folder = Fm::Folder::findByPath(destPath_);
|
||||||
|
+ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
|
||||||
|
+ folder->reload();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--- libfm-qt-0.14.1.orig/src/utilities.cpp
|
||||||
|
+++ libfm-qt-0.14.1/src/utilities.cpp
|
||||||
|
@@ -157,7 +157,8 @@ bool isCurrentPidClipboardData(const QMi
|
||||||
|
}
|
||||||
|
|
||||||
|
bool changeFileName(const Fm::FilePath& filePath, const QString& newName, QWidget* parent, bool showMessage) {
|
||||||
|
- auto dest = filePath.parent().child(newName.toLocal8Bit().constData());
|
||||||
|
+ auto parent_path = filePath.parent();
|
||||||
|
+ auto dest = parent_path.child(newName.toLocal8Bit().constData());
|
||||||
|
Fm::GErrorPtr err;
|
||||||
|
if(!g_file_move(filePath.gfile().get(), dest.gfile().get(),
|
||||||
|
GFileCopyFlags(G_FILE_COPY_ALL_METADATA |
|
||||||
|
@@ -170,6 +171,13 @@ bool changeFileName(const Fm::FilePath&
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // reload the containing folder if it is in use but does not have a file monitor
|
||||||
|
+ auto folder = Fm::Folder::findByPath(parent_path);
|
||||||
|
+ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
|
||||||
|
+ folder->reload();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -263,6 +271,12 @@ _retry:
|
||||||
|
|
||||||
|
QMessageBox::critical(parent ? parent->window() : nullptr, QObject::tr("Error"), err.message());
|
||||||
|
}
|
||||||
|
+ else { // reload the containing folder if it is in use but does not have a file monitor
|
||||||
|
+ auto folder = Fm::Folder::findByPath(parentDir);
|
||||||
|
+ if(folder && folder->isValid() && folder->isLoaded() && !folder->hasFileMonitor()) {
|
||||||
|
+ folder->reload();
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
uid_t uidFromName(QString name) {
|
@ -1,12 +0,0 @@
|
|||||||
# For more information on what jobs are run see:
|
|
||||||
# https://salsa.debian.org/salsa-ci-team/pipeline
|
|
||||||
#
|
|
||||||
# To enable the jobs, go to your repository (at salsa.debian.org)
|
|
||||||
# and click over Settings > CI/CD > Expand (in General pipelines).
|
|
||||||
# In "Custom CI config path" write debian/salsa-ci.yml and click
|
|
||||||
# in "Save Changes". The CI tests will run after the next commit.
|
|
||||||
---
|
|
||||||
include:
|
|
||||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
|
||||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
# This list will always be very long, it's okay
|
|
||||||
libfm-qt source: very-long-line-length-in-source-file * > 512 [data/archivers.list:*]
|
|
||||||
|
|
||||||
# Long lines in the upstream changelog are okay
|
|
||||||
libfm-qt source: very-long-line-length-in-source-file * > 512 [CHANGELOG:*]
|
|
@ -1,52 +1,50 @@
|
|||||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
mQINBF6cxrwBEADfl3ydxNfLBbWGPesXty2baQgixZ3D6aCxadI2kX+aikmT8rd0
|
mQINBFXQeMMBEACif4+9pTrC6uNmRng0ZbzLh7p3cazmbnp2YFgDQDJZ7ZNmebxy
|
||||||
ttDKN18cXV52Ssxnj0qhgf4hwnu/b0be6BzqSEyGM+UQR3X2CYpxrMakfW32Q18K
|
ngRuRhjGuDcFAL/37BwJnrBpfZFK9ljoH4Fo5Jm9cOELaTy7AIcEiV9dKMyrKF1E
|
||||||
X5ec0RPR2ucBq9G0r9t6FYC8FkJ4uQUU3xxrLW3z302S0Makjgzm8BV9WrFQ7oFF
|
C76d8jHVuzuPbI92DkFdLZAdk+qjrrAy0x43PvUd+aaBGLcFs1ZMk7gOvElc2d95
|
||||||
uJQj0BHbHYC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NQBSe/FtcMzGF6xIVr4lnrL0bFjqBdQpdTC7vns3QSKk8/GFiEfpv
|
waYsitz8+LSv3tawZJ0iQkKc9nerQMuBD+AzIr3i4NgXiEIN513esUtnKzeyIIsL
|
||||||
kzXrDbGV7jX2OWDjNHKcmXX2+E1CsNaJgS7zOgZw5jvbvlTLJUwyYNlM1VLI2OFW
|
ntUcBjXKuLCj8OZrZtexjq7edWWbN57/3ikyS2Z7y0i3O30qk5jmccSaS6kA7xTY
|
||||||
Oa86l8pqli+B7rpTbsAE9Ut8qUaWjm87oUNSJbaKgqNnMaE+b/8VJaEeWHgQJwsD
|
WCDFzbN2v2y+vGu9KYn+2HtrP2BtNa8JTh3waNeLUTpn4GV4mMrsZjOy6vhhHb91
|
||||||
bJSJ/O/vzlRtDjOJ1JDlMRLs7TnOFeUh5pgwyaJoidYbJEiGlMGJbI6BjwhDTBFO
|
1TKfI1gvjk7lE9xaWmcDjdI55dw3jIq8kK9SdgORGq9/S3g7KJNRjme+6GjqQfk=
|
||||||
NLJtd3SsRjc7ICtGdCvej59IvCDTjxtkhx5okF03APi1aXpHQrE18/arFD7BpoGO
|
=h7ww
|
||||||
sw==
|
|
||||||
=gSIv
|
|
||||||
-----END PGP PUBLIC KEY BLOCK-----
|
-----END PGP PUBLIC KEY BLOCK-----
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
version=4
|
version=4
|
||||||
opts="searchmode=plain, \
|
opts="pgpsigurlmangle=s/$/.asc/" \
|
||||||
pgpsigurlmangle=s/$/.asc/, \
|
https://github.com/lxqt/libfm-qt/releases .*/libfm-qt-([\d\.]+).tar.xz
|
||||||
uversionmangle=s/(\d+\.\d+\.\d+).*/$1/" \
|
|
||||||
https://api.github.com/repos/lxqt/@PACKAGE@/releases https:\/\/github.com\/lxqt\/@PACKAGE@\/releases\/download\/@ANY_VERSION@\/@PACKAGE@-@ANY_VERSION@.tar.xz
|
|
||||||
|
Loading…
Reference in new issue