bool Folder::isFileExcludedAbsolute(const QString& fullPath) const
{
+ if (!fullPath.startsWith(path())) {
+ // Mark paths we're not responsible for as excluded...
+ return true;
+ }
+
QString myFullPath = fullPath;
if (myFullPath.endsWith(QLatin1Char('/'))) {
myFullPath.chop(1);
}
- if (!myFullPath.startsWith(path())) {
- // Mark paths we're not responsible for as excluded...
- return true;
- }
-
QString relativePath = myFullPath.mid(path().size());
auto excl = ExcludedFiles::instance().isExcluded(myFullPath, relativePath, _definition.ignoreHiddenFiles);
return excl != CSYNC_NOT_EXCLUDED;
QString fileName = systemFileName.normalized(QString::NormalizationForm_C);
QString fileNameSlash = fileName;
- if( fileName != QLatin1String("/") && !fileName.isEmpty() ) {
- file = folder->path() + fileName;
+ if(fileName != QLatin1String("/") && !fileName.isEmpty()) {
+ file += fileName;
}
if( fileName.endsWith(QLatin1Char('/')) ) {
}
// Is it excluded?
- if( folder->isFileExcludedAbsolute(file) ) {
+ if( folder->isFileExcludedRelative(fileName) ) {
return SyncFileStatus(SyncFileStatus::STATUS_IGNORE);
}
SyncJournalFileRecord rec = dbFileRecord_capi(folder, fileName );
if (folder->estimateState(fileName, type, &status)) {
- qDebug() << Q_FUNC_INFO << "Folder estimated status for" << fileName << "to" << status.toSocketAPIString();
+ qDebug() << "Folder estimated status for" << fileName << "to" << status.toSocketAPIString();
} else if (fileName == "") {
// sync folder itself
switch (folder->syncResult().status()) {
if (rec.isValid()) {
status.set(SyncFileStatus::STATUS_SYNC);
} else {
- qDebug() << Q_FUNC_INFO << "Could not determine state for folder" << fileName << "will set STATUS_NEW";
+ qDebug() << "Could not determine state for folder" << fileName << "will set STATUS_NEW";
status.set(SyncFileStatus::STATUS_NEW);
}
} else if (type == CSYNC_FTW_TYPE_FILE) {
}
}
} else {
- qDebug() << Q_FUNC_INFO << "Could not determine state for file" << fileName << "will set STATUS_NEW";
+ qDebug() << "Could not determine state for file" << fileName << "will set STATUS_NEW";
status.set(SyncFileStatus::STATUS_NEW);
}
}