From 2169c8ab4f4e05575f60c272bfd400f36f432ab5 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Tue, 2 Mar 2010 09:13:34 +0000 Subject: [PATCH] Fix of issue 3653 (Windows only issue). svn: r14566 --- src/cli/clidbman.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cli/clidbman.py b/src/cli/clidbman.py index a7060b101..c4ee2da3b 100644 --- a/src/cli/clidbman.py +++ b/src/cli/clidbman.py @@ -52,6 +52,7 @@ LOG = logging.getLogger(".clidbman") import gen.db from gen.plug import BasePluginManager import config +import constfunc #------------------------------------------------------------------------- # @@ -367,6 +368,13 @@ def time_val(dirpath): meta = os.path.join(dirpath, META_NAME) if os.path.isfile(meta): tval = os.stat(meta)[9] + # This gives creation date in Windows, but correct date in Linux + if constfunc.win(): + # Try to use last modified date instead in Windows + # and check that it is later than the creation date. + tval_mod = os.stat(meta)[8] + if tval_mod > tval: + tval = tval_mod last = time.strftime('%x %X', time.localtime(tval)) else: tval = 0