From 790c2a8c3708fa2d1a62363b90f14e8cde6ed1c3 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 6 Apr 2021 16:55:59 +0200 Subject: [PATCH] use QFileInfo to check if path is absolute to avoid assert on windows on windos absolute path does not have to start with / . Remove failing assert when editing ignored files list. Signed-off-by: Matthieu Gallien --- src/gui/accountsettings.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index d3a2b955f7f2f..b501569469f67 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -385,8 +385,10 @@ void AccountSettings::slotEditCurrentLocalIgnoredFiles() void AccountSettings::openIgnoredFilesDialog(const QString & absFolderPath) { - Q_ASSERT(absFolderPath.startsWith('/')); - Q_ASSERT(absFolderPath.endsWith('/')); +#if !defined QT_NO_DEBUG + QFileInfo folderPath(absFolderPath); + Q_ASSERT(folderPath.isAbsolute()); +#endif const QString ignoreFile = absFolderPath + ".sync-exclude.lst"; auto layout = new QVBoxLayout();