nextcloud-desktop: backport fix for #7026 bug
This commit is contained in:
parent
b5a0d8260a
commit
226526fcbc
2 changed files with 40 additions and 1 deletions
35
helpers/DATA/nextcloud-desktop/7081.patch
Normal file
35
helpers/DATA/nextcloud-desktop/7081.patch
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
From a1a56edccd2943e6f81465b3dfa6c703726fb0fa Mon Sep 17 00:00:00 2001
|
||||
From: Matthieu Gallien <matthieu.gallien@nextcloud.com>
|
||||
Date: Fri, 6 Sep 2024 16:02:38 +0200
|
||||
Subject: [PATCH] add missing exception handling
|
||||
|
||||
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
|
||||
---
|
||||
src/libsync/filesystem.cpp | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/libsync/filesystem.cpp b/src/libsync/filesystem.cpp
|
||||
index 0eb66c4f29fa..9df128682f86 100644
|
||||
--- a/src/libsync/filesystem.cpp
|
||||
+++ b/src/libsync/filesystem.cpp
|
||||
@@ -484,11 +484,15 @@ bool FileSystem::isFolderReadOnly(const std::filesystem::path &path) noexcept
|
||||
FileSystem::FilePermissionsRestore::FilePermissionsRestore(const QString &path, FolderPermissions temporaryPermissions)
|
||||
: _path(path)
|
||||
{
|
||||
- const auto stdStrPath = _path.toStdWString();
|
||||
- _initialPermissions = FileSystem::isFolderReadOnly(stdStrPath) ? OCC::FileSystem::FolderPermissions::ReadOnly : OCC::FileSystem::FolderPermissions::ReadWrite;
|
||||
- if (_initialPermissions != temporaryPermissions) {
|
||||
- _rollbackNeeded = true;
|
||||
- FileSystem::setFolderPermissions(_path, temporaryPermissions);
|
||||
+ try {
|
||||
+ const auto stdStrPath = _path.toStdWString();
|
||||
+ _initialPermissions = FileSystem::isFolderReadOnly(stdStrPath) ? OCC::FileSystem::FolderPermissions::ReadOnly : OCC::FileSystem::FolderPermissions::ReadWrite;
|
||||
+ if (_initialPermissions != temporaryPermissions) {
|
||||
+ _rollbackNeeded = true;
|
||||
+ FileSystem::setFolderPermissions(_path, temporaryPermissions);
|
||||
+ }
|
||||
+ } catch (const std::filesystem::filesystem_error &e) {
|
||||
+ qCWarning(lcFileSystem()) << "exception when modifying folder permissions" << e.what() << e.path1().c_str() << e.path2().c_str();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
VERSION=2
|
||||
VERSION=3
|
||||
EXTERNAL='deb-src http://ppa.launchpad.net/nextcloud-devs/client/ubuntu $UPSTREAM main'
|
||||
REPOKEY="60EE47FBAD3DD469"
|
||||
BACKPORT=true
|
||||
|
|
@ -29,6 +29,10 @@ sed -i "s|Utility|Network|" mirall.desktop.in
|
|||
#Prevent ppc64el arch since qtwebengine is not build for ppc64el.
|
||||
sed -i 's|Architecture: any|Architecture: amd64 arm64 armhf i386 mips64el mipsel|g' debian/control
|
||||
|
||||
# Apply fix for:
|
||||
# [Bug]: filesystem error with multi-byte character leads to crash on Ubuntu 22.04 #7026
|
||||
patch_p1 $DATA/7081.patch
|
||||
|
||||
changelog "Imported into Trisquel"
|
||||
|
||||
package
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue