mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
Propagator: Add entry with dummy etag on local mkdir. #2761
This commit is contained in:
parent
c11358219a
commit
191d66fc6f
1 changed files with 11 additions and 0 deletions
|
@ -125,6 +125,17 @@ void PropagateLocalMkdir::start()
|
||||||
done( SyncFileItem::NormalError, tr("could not create directory %1").arg(newDirStr) );
|
done( SyncFileItem::NormalError, tr("could not create directory %1").arg(newDirStr) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Insert the directory into the database. The correct etag will be set later,
|
||||||
|
// once all contents have been propagated, because should_update_etag is true.
|
||||||
|
// Adding an entry with a dummy etag to the database still makes sense here
|
||||||
|
// so the database is aware that this folder exists even if the sync is aborted
|
||||||
|
// before the correct etag is stored.
|
||||||
|
SyncJournalFileRecord record(*_item, newDirStr);
|
||||||
|
record._etag = "_invalid_";
|
||||||
|
_propagator->_journal->setFileRecord(record);
|
||||||
|
_propagator->_journal->commit("localMkdir");
|
||||||
|
|
||||||
done(SyncFileItem::Success);
|
done(SyncFileItem::Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue