use QFileInfo to check if path is absolute to avoid assert on windows
authorMatthieu Gallien <matthieu_gallien@yahoo.fr>
Tue, 6 Apr 2021 14:55:59 +0000 (16:55 +0200)
committerKevin Ottens (Rebase PR Action) <er-vin@users.noreply.github.com>
Wed, 7 Apr 2021 07:40:07 +0000 (07:40 +0000)
on windos absolute path does not have to start with / . Remove failing assert
when editing ignored files list.

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
src/gui/accountsettings.cpp

index d3a2b955f7f2fa1e6e35c4a9071cae5bf33b847a..a881606f78069834aeac760060dd9d65018f2ba1 100644 (file)
@@ -385,8 +385,7 @@ void AccountSettings::slotEditCurrentLocalIgnoredFiles()
 
 void AccountSettings::openIgnoredFilesDialog(const QString & absFolderPath)
 {
-    Q_ASSERT(absFolderPath.startsWith('/'));
-    Q_ASSERT(absFolderPath.endsWith('/'));
+    Q_ASSERT(QFileInfo(absFolderPath).isAbsolute());
 
     const QString ignoreFile = absFolderPath + ".sync-exclude.lst";
     auto layout = new QVBoxLayout();