diff --git a/src/Synchronizer.cpp b/src/Synchronizer.cpp index 6ebeead4b..cbe402956 100644 --- a/src/Synchronizer.cpp +++ b/src/Synchronizer.cpp @@ -491,7 +491,11 @@ void Synchronizer::synchronizeWithJournal(const string &sourceFile, list count += err; } cache->rename(key, newKey, size - bf::file_size(oldCachePath)); - replicator->remove(oldCachePath.string().c_str()); + #ifndef NDEBUG + assert(replicator->remove(oldCachePath) == 0); + #else + replicator->remove(oldCachePath); + #endif } // update the metadata for the source file @@ -504,7 +508,11 @@ void Synchronizer::synchronizeWithJournal(const string &sourceFile, list // delete the old object & journal file cache->deletedJournal(bf::file_size(journalName)); - replicator->remove(journalName.c_str()); + #ifndef NDEBUG + assert(replicator->remove(journalName) == 0); + #else + replicator->remove(journalName); + #endif cs->deleteObject(key); }