[Pkg-owncloud-commits] [owncloud-client] 175/498: Propagator: Add entry with dummy etag on local mkdir. #2761
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 191d66fc6fca700d849dab3af814c3e23bcff72c
Author: Christian Kamm <kamm at incasoftware.de>
Date: Wed Jun 17 13:56:37 2015 +0200
Propagator: Add entry with dummy etag on local mkdir. #2761
---
src/libsync/propagatorjobs.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/libsync/propagatorjobs.cpp b/src/libsync/propagatorjobs.cpp
index a48ccac..c5042f8 100644
--- a/src/libsync/propagatorjobs.cpp
+++ b/src/libsync/propagatorjobs.cpp
@@ -125,6 +125,17 @@ void PropagateLocalMkdir::start()
done( SyncFileItem::NormalError, tr("could not create directory %1").arg(newDirStr) );
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);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list