Skip to content

Commit

Permalink
use QFileInfo to check if path is absolute to avoid assert on windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mgallien committed Apr 6, 2021
1 parent 4c83780 commit 790c2a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 790c2a8

Please sign in to comment.