Skip to content

Commit

Permalink
Only sync after complete files; use QDir filter for ./..
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Wachter committed Mar 20, 2013
1 parent 0c5b2a3 commit 3ad7db3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libssu/ssusettings.cpp
Expand Up @@ -41,16 +41,14 @@ void SsuSettings::merge(){

SsuLog *ssuLog = SsuLog::instance();

QDirIterator it(settingsd, QDirIterator::FollowSymlinks);
QDirIterator it(settingsd, QDir::AllEntries|QDir::NoDotAndDotDot, QDirIterator::FollowSymlinks);
QStringList settingsFiles;

QFileInfo oldSettingsInfo(fileName());

while (it.hasNext()){
QString f = it.next();

if (it.fileName() == "." || it.fileName() == "..") continue;

settingsFiles.append(it.filePath());

QFileInfo info(it.filePath());
Expand Down Expand Up @@ -84,8 +82,8 @@ void SsuSettings::merge(){

settings.endGroup();
endGroup();
sync();
}
sync();
}
}

Expand Down

0 comments on commit 3ad7db3

Please sign in to comment.