Fix mtime time detection

This commit is contained in:
Worros 2008-10-12 18:21:42 +08:00
parent 6c4e2f3eb9
commit c2c37dc5ee
2 changed files with 2 additions and 1 deletions

View File

@ -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']

View File

@ -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()