diff options
author | Andrés Ambrois <andresambrois@gmail.com> | 2010-07-02 06:40:51 (GMT) |
---|---|---|
committer | Anish Mangal <anish@sugarlabs.org> | 2011-08-26 06:19:51 (GMT) |
commit | 326a5519d6c4ce5a3b1a23b02e37cadb9c75be56 (patch) | |
tree | 2042b07b90c6d3ecd558cefad05e6fc7640ca7b6 | |
parent | b0dfde8f9687ab09adcbab3fdd53e0579696a822 (diff) |
Check ctime on index rebuild
Signed-off-by: Andrés Ambrois <andresambrois@gmail.com>
Signed-off-by: Anish Mangal <anish@sugarlabs.org>
-rw-r--r-- | src/carquinyol/datastore.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/carquinyol/datastore.py b/src/carquinyol/datastore.py index 055c068..4712bea 100644 --- a/src/carquinyol/datastore.py +++ b/src/carquinyol/datastore.py @@ -130,6 +130,10 @@ class DataStore(dbus.service.Object): if os.path.exists(path): props['filesize'] = os.stat(path).st_size update_metadata = True + if 'ctime' not in props: + props['ctime'] = time.strftime(CTIME_FORMAT, + time.localtime(int(props['timestamp']))) + update_metadata = True if update_metadata: self._metadata_store.store(uid, props) self._index_store.store(uid, props) |