Fix mtime time detection
This commit is contained in:
parent
6c4e2f3eb9
commit
c2c37dc5ee
|
@ -89,7 +89,6 @@ class GuiAutoImport (threading.Thread):
|
||||||
|
|
||||||
# Add directory to importer object and set the initial mtime reference.
|
# Add directory to importer object and set the initial mtime reference.
|
||||||
self.importer.addImportDirectory(self.path)
|
self.importer.addImportDirectory(self.path)
|
||||||
self.importer.setWatchTime()
|
|
||||||
self.do_import()
|
self.do_import()
|
||||||
|
|
||||||
interval=int(self.intervalTBuffer.get_text(self.intervalTBuffer.get_start_iter(), self.intervalTBuffer.get_end_iter()))
|
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.setQuiet(False)
|
||||||
self.importer.setFailOnError(False)
|
self.importer.setFailOnError(False)
|
||||||
self.importer.setHandCount(0)
|
self.importer.setHandCount(0)
|
||||||
|
self.importer.setWatchTime()
|
||||||
|
|
||||||
self.server=settings['db-host']
|
self.server=settings['db-host']
|
||||||
self.user=settings['db-user']
|
self.user=settings['db-user']
|
||||||
|
|
|
@ -130,6 +130,7 @@ class Importer:
|
||||||
for file in self.filelist:
|
for file in self.filelist:
|
||||||
stat_info = os.stat(file)
|
stat_info = os.stat(file)
|
||||||
if stat_info.st_mtime > self.updated:
|
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.import_file_dict(file)
|
||||||
self.updated = time()
|
self.updated = time()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user