On 02/11/2011 07:50 AM, Sascha Silbe wrote:
The timestamp property might be missing due to incomplete writes (out of
power, system crash) or software bugs.

So if the timestamp is missing we will create the entry with the current timestamp when we update_the_index. I guess there is no better timestamp we can set.

Do we have other properties we should care about?

When restoring the other properties we set as well "update_metadata = True", I think you have to do that here as well.

Regards,
   Simon


Signed-off-by: Sascha Silbe<si...@activitycentral.com>
---
  src/carquinyol/datastore.py |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/carquinyol/datastore.py b/src/carquinyol/datastore.py
index 837de35..12458fb 100644
--- a/src/carquinyol/datastore.py
+++ b/src/carquinyol/datastore.py
@@ -140,6 +140,8 @@ class DataStore(dbus.service.Object):
                          if os.path.exists(path):
                              props['filesize'] = os.stat(path).st_size
                              update_metadata = True
+                    if 'timestamp' not in props:
+                        props['timestamp'] = str(int(time.time()))
                      if 'creation_time' not in props:
                          if 'ctime' in props:
                              try:

_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to