From c2c37dc5ee095f8bf7bc4b7143b657b671d78ba4 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 12 Oct 2008 18:21:42 +0800 Subject: [PATCH] Fix mtime time detection --- pyfpdb/GuiAutoImport.py | 2 +- pyfpdb/fpdb_import.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfpdb/GuiAutoImport.py b/pyfpdb/GuiAutoImport.py index 9cc10906..23493664 100644 --- a/pyfpdb/GuiAutoImport.py +++ b/pyfpdb/GuiAutoImport.py @@ -89,7 +89,6 @@ class GuiAutoImport (threading.Thread): # Add directory to importer object and set the initial mtime reference. self.importer.addImportDirectory(self.path) - self.importer.setWatchTime() self.do_import() interval=int(self.intervalTBuffer.get_text(self.intervalTBuffer.get_start_iter(), self.intervalTBuffer.get_end_iter())) @@ -110,6 +109,7 @@ class GuiAutoImport (threading.Thread): self.importer.setQuiet(False) self.importer.setFailOnError(False) self.importer.setHandCount(0) + self.importer.setWatchTime() self.server=settings['db-host'] self.user=settings['db-user'] diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index c844c00d..458b34d5 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -130,6 +130,7 @@ class Importer: for file in self.filelist: stat_info = os.stat(file) if stat_info.st_mtime > self.updated: + # print "File: " + str(file) + " mtime: " + str(stat_info.st_mtime) + " update: " + str(self.updated) self.import_file_dict(file) self.updated = time()