mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
owncloudcmd: Filter out empty lines in selectivesync
This commit is contained in:
parent
ec81cdefb0
commit
7b99877c68
@ -445,7 +445,9 @@ restart_sync:
|
||||
if (!f.open(QFile::ReadOnly)) {
|
||||
qCritical() << "Could not open file containing the list of unsynced folders: " << options.unsyncedfolders;
|
||||
} else {
|
||||
selectiveSyncList = QString::fromUtf8(f.readAll()).split('\n');
|
||||
// filter out empty lines and comments
|
||||
selectiveSyncList = QString::fromUtf8(f.readAll()).split('\n').filter(QRegExp("\\S+")).filter(QRegExp("^[^#]"));
|
||||
|
||||
for (int i = 0; i < selectiveSyncList.count(); ++i) {
|
||||
if (!selectiveSyncList.at(i).endsWith(QLatin1Char('/'))) {
|
||||
selectiveSyncList[i].append(QLatin1Char('/'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user