Mercurial > dedupe
diff FileDBLink.cpp @ 92:f49023c61dac
Support for bulk insertion.
| author | Tom Fredrik Blenning Klaussen <bfg@bfgconsult.no> |
|---|---|
| date | Mon, 21 Oct 2013 20:03:39 +0200 |
| parents | a5788991ca9f |
| children | 308a718812ba |
line wrap: on
line diff
--- a/FileDBLink.cpp Mon Oct 21 16:21:54 2013 +0200 +++ b/FileDBLink.cpp Mon Oct 21 20:03:39 2013 +0200 @@ -8,6 +8,11 @@ #include <boost/bind.hpp> +FileDBLink::~FileDBLink() +{ + commit(); +} + void FileDBLink::updateIfModified(const QString& path, bool lazy) { QFileInfo fileinfo(path); @@ -30,10 +35,9 @@ const QDateTime& lastModified, bool lazy) { QByteArray hash; - //if (!lazy || updateAllWithSize(size)) if (!lazy) hash = computeHash(path); - addFile(path, size, lastModified, hash); + addFile(path, size, lastModified, hash, lazy); } void FileDBLink::addFile(const QFileInfo& fileinfo, bool lazy) @@ -91,7 +95,6 @@ const QDateTime& lastModified, bool lazy) { QByteArray hash; - //if (!lazy || updateAllWithSize(size)) if (!lazy) hash = computeHash(path); updateFile(path, size, lastModified, hash); @@ -221,3 +224,8 @@ } return dbinf_ptr_t(); } + +bool FileDBLink::commit() +{ + return true; +}
