From 9a60cf84c8cd90894dd0af14a09d88a57f6f3e6e Mon Sep 17 00:00:00 2001 From: Worros Date: Mon, 13 Oct 2008 02:06:28 +0800 Subject: [PATCH] Real fix this time, modify GuiAutoImport to actually tell importer to monitor the directory --- pyfpdb/GuiAutoImport.py | 2 +- pyfpdb/fpdb_import.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/GuiAutoImport.py b/pyfpdb/GuiAutoImport.py index 23493664..6953d1f9 100644 --- a/pyfpdb/GuiAutoImport.py +++ b/pyfpdb/GuiAutoImport.py @@ -88,7 +88,7 @@ class GuiAutoImport (threading.Thread): self.path=self.pathTBuffer.get_text(self.pathTBuffer.get_start_iter(), self.pathTBuffer.get_end_iter()) # Add directory to importer object and set the initial mtime reference. - self.importer.addImportDirectory(self.path) + self.importer.addImportDirectory(self.path, True) self.do_import() interval=int(self.intervalTBuffer.get_text(self.intervalTBuffer.get_start_iter(), self.intervalTBuffer.get_end_iter())) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index 73e141e7..fdf3ab3c 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -119,7 +119,7 @@ class Importer: if os.path.isdir(file): print "BulkImport is not recursive - please select the final directory in which the history files are" else: - self.filelist = self.filelist + [dir+os.sep+file] + self.filelist = self.filelist + [os.path.join(dir, file)] #Remove duplicates set(self.filelist) @@ -137,6 +137,7 @@ class Importer: for dir in self.dirlist: for file in os.listdir(dir): self.filelist = self.filelist + [dir+os.sep+file] + set(filelist) for file in self.filelist: stat_info = os.stat(file)