- add exclude patterns to sitecopy config, Patch contributed by Alvaro

Soliverez
This commit is contained in:
Klaas Freitag 2011-12-12 17:26:13 +01:00
parent a3fa419f82
commit c23c96cdc6
2 changed files with 12 additions and 1 deletions

View file

@ -19,6 +19,11 @@ namespace Mirall {
SitecopyConfig::SitecopyConfig()
{
// file patterns to be exclude
_ExcludePatterns.append("*.bak");
_ExcludePatterns.append("*~");
_ExcludePatterns.append(".*");
_ExcludePatterns.append("\"#*#\"");
}
@ -106,6 +111,10 @@ bool SitecopyConfig::sitecopyConfigToFile()
out << " " << configKey << " " << configs[configKey] << '\n';
qDebug() << " Setting: " << configKey << ": " << configs[configKey];
}
foreach( QString pattern, _ExcludePatterns ) {
out << " exclude " << pattern << '\n';
}
out << '\n';
}
configFile.close();

View file

@ -45,8 +45,10 @@ private:
QHash<QString, QHash<QString, QString> > _Sites;
QHash<QString, QString> _CurrSite;
// QHash<QString, QStringList> _ChangesHash;
QString _CurrSiteName;
QStringList _ExcludePatterns;
QString _CurrSiteName;
};
};
#endif // SITECOPYCONFIG_H