From 4c20158f37d3d39568d5e556fdc6629699b98c45 Mon Sep 17 00:00:00 2001 From: Germano Massullo Date: Fri, 10 May 2019 10:00:00 +0200 Subject: [PATCH] added issue_1000.patch --- issue_1000.patch | 72 +++++++++++++++++++++++++++++++++++++++++++ nextcloud-client.spec | 8 +++-- 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 issue_1000.patch diff --git a/issue_1000.patch b/issue_1000.patch new file mode 100644 index 0000000..31117f1 --- /dev/null +++ b/issue_1000.patch @@ -0,0 +1,72 @@ +diff -urNr desktop-2.5.2-orig/src/gui/folderwatcher.cpp desktop-2.5.2/src/gui/folderwatcher.cpp +--- desktop-2.5.2-orig/src/gui/folderwatcher.cpp 2019-03-19 02:52:24.000000000 +0100 ++++ desktop-2.5.2/src/gui/folderwatcher.cpp 2019-05-10 09:53:53.861934327 +0200 +@@ -75,9 +75,28 @@ + return _isReliable; + } + ++ ++void FolderWatcher::appendSubPaths(QDir dir, QStringList& subPaths) { ++ QStringList newSubPaths = dir.entryList(QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files); ++ for (int i = 0; i < newSubPaths.size(); i++) { ++ QString path = dir.path() + "/" + newSubPaths[i]; ++ QFileInfo fileInfo(path); ++ subPaths.append(path); ++ if (fileInfo.isDir()) { ++ QDir dir(path); ++ appendSubPaths(dir, subPaths); ++ } ++ } ++} ++ + void FolderWatcher::changeDetected(const QString &path) + { ++ QFileInfo fileInfo(path); + QStringList paths(path); ++ if (fileInfo.isDir()) { ++ QDir dir(path); ++ appendSubPaths(dir, paths); ++ } + changeDetected(paths); + } + +diff -urNr desktop-2.5.2-orig/src/gui/folderwatcher.h desktop-2.5.2/src/gui/folderwatcher.h +--- desktop-2.5.2-orig/src/gui/folderwatcher.h 2019-03-19 02:52:24.000000000 +0100 ++++ desktop-2.5.2/src/gui/folderwatcher.h 2019-05-10 09:56:15.063411278 +0200 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + class QTimer; + +@@ -120,6 +121,8 @@ + Folder *_folder; + bool _isReliable = true; + ++ void appendSubPaths(QDir dir, QStringList& subPaths); ++ + friend class FolderWatcherPrivate; + }; + } +diff -urNr desktop-2.5.2-orig/test/testfolderwatcher.cpp desktop-2.5.2/test/testfolderwatcher.cpp +--- desktop-2.5.2-orig/test/testfolderwatcher.cpp 2019-03-19 02:52:24.000000000 +0100 ++++ desktop-2.5.2/test/testfolderwatcher.cpp 2019-05-10 09:57:51.453556579 +0200 +@@ -140,6 +140,16 @@ + QVERIFY(waitForPathChanged(file)); + } + ++ void testMove3LevelDirWithFile() { ++ QString file(_rootPath + "/a0/b/c/empty.txt"); ++ mkdir(_rootPath + "/a0"); ++ mkdir(_rootPath + "/a0/b"); ++ mkdir(_rootPath + "/a0/b/c"); ++ touch(file); ++ mv(_rootPath + "/a0 ", _rootPath + "/a"); ++ QVERIFY(waitForPathChanged(_rootPath + "/a/b/c/empty.txt")); ++ } ++ + void testCreateADir() { + QString file(_rootPath+"/a1/b1/new_dir"); + mkdir(file); diff --git a/nextcloud-client.spec b/nextcloud-client.spec index 797b9e8..c313547 100644 --- a/nextcloud-client.spec +++ b/nextcloud-client.spec @@ -2,7 +2,7 @@ Name: nextcloud-client Version: 2.5.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Nextcloud Client # -libs are LGPLv2+, rest GPLv2 @@ -19,6 +19,7 @@ Source1: nextcloud.appdata.xml # different from the bundled one. #Patch0: %%{name}-%%{version}-syslibs.patch ## patch 1 solves https://bugzilla.redhat.com/show_bug.cgi?id=1409252 +Patch0: issue_1000.patch Patch1: %{name}-icon.patch BuildRequires: check @@ -135,7 +136,7 @@ The nextcloud desktop client dolphin extension. %prep %setup -q -n desktop-%{version} -#%%patch0 -p1 +%patch0 -p1 #rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication @@ -221,6 +222,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/nextcloud. %endif %changelog +* Fri May 10 2019 Germano Massullo - 2.5.2-2 +- added issue_1000.patch + * Thu Apr 11 2019 Germano Massullo - 2.5.2-1 - 2.5.2 release - Changed python2-sphinx requirement to python3-sphinx