diff --git a/sources/ElementsCollection/elementslocation.cpp b/sources/ElementsCollection/elementslocation.cpp index c14f244ff..b9b56cad6 100644 --- a/sources/ElementsCollection/elementslocation.cpp +++ b/sources/ElementsCollection/elementslocation.cpp @@ -523,7 +523,9 @@ bool ElementsLocation::isCompanyCollection() const */ bool ElementsLocation::isCustomCollection() const { - return fileSystemPath().startsWith(QETApp::customElementsDirN()); + const QString dir = QETApp::customElementsDirN(); + const QString path = fileSystemPath(); + return path == dir || path.startsWith(dir + QLatin1Char('/')); } /** diff --git a/sources/ElementsCollection/fileelementcollectionitem.cpp b/sources/ElementsCollection/fileelementcollectionitem.cpp index 5f42efec4..18ba33af6 100644 --- a/sources/ElementsCollection/fileelementcollectionitem.cpp +++ b/sources/ElementsCollection/fileelementcollectionitem.cpp @@ -274,7 +274,9 @@ bool FileElementCollectionItem::isCompanyCollection() const */ bool FileElementCollectionItem::isCustomCollection() const { - return fileSystemPath().startsWith(QETApp::customElementsDirN()); + const QString dir = QETApp::customElementsDirN(); + const QString path = fileSystemPath(); + return path == dir || path.startsWith(dir + QLatin1Char('/')); } /**