Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorckamm <mail@ckamm.de>2017-04-20 10:16:55 +0300
committerMarkus Goetz <markus@woboq.com>2017-04-20 10:16:55 +0300
commitea378fe8374ae8c68cfcfd2043d504a7a0e3c592 (patch)
tree6a5555bddab99502c1d1fb7ac33d6894e82680f2 /src/gui/folderstatusmodel.cpp
parentde9ee295be686f8272e1b89c288c596e9b86fa5c (diff)
FolderStatusModel: Fix crash for empty relativePath (#5713)
The problem was that split("", SkipEmptyParts) is the empty list. See https://sentry.io/owncloud/desktop-win-and-mac/issues/251167186/
Diffstat (limited to 'src/gui/folderstatusmodel.cpp')
-rw-r--r--src/gui/folderstatusmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index a4079ff07..42c34d1e4 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -652,7 +652,7 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
newInfo._size = job->_sizes.value(path);
newInfo._isExternal = permissionMap.value(removeTrailingSlash(path)).toString().contains("M");
newInfo._path = relativePath;
- newInfo._name = relativePath.split('/', QString::SkipEmptyParts).last();
+ newInfo._name = removeTrailingSlash(relativePath).split('/').last();
if (relativePath.isEmpty())
continue;