From b268177bf88179a41f7069c344af853284db6032 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 7 May 2025 13:29:30 +0200 Subject: [PATCH] Small code cleanup pathElements[n] cannot contain '/' as they are result of "split(u'/')" Change-Id: I2a3c4651f65aa2731947a514a1f18660a95063ca Reviewed-by: Edward Welbourne --- src/gui/itemmodels/qfilesystemmodel.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/itemmodels/qfilesystemmodel.cpp b/src/gui/itemmodels/qfilesystemmodel.cpp index 3d1ed4fb961..8cfd0650e8f 100644 --- a/src/gui/itemmodels/qfilesystemmodel.cpp +++ b/src/gui/itemmodels/qfilesystemmodel.cpp @@ -402,8 +402,6 @@ QFileSystemModelPrivate::QFileSystemNode *QFileSystemModelPrivate::node(const QS QString rootPath = QDir(longPath).rootPath(); pathElements.prepend(rootPath); } - if (pathElements.at(0).endsWith(u'/')) - pathElements[0].chop(1); } #else // add the "/" item, since it is a valid path element on Unix