Real fix this time, modify GuiAutoImport to actually tell importer to monitor the directory

This commit is contained in:
Worros 2008-10-13 02:06:28 +08:00
parent 8ca5a5c965
commit 9a60cf84c8
2 changed files with 3 additions and 2 deletions

View File

@ -88,7 +88,7 @@ class GuiAutoImport (threading.Thread):
self.path=self.pathTBuffer.get_text(self.pathTBuffer.get_start_iter(), self.pathTBuffer.get_end_iter()) 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. # 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() 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()))

View File

@ -119,7 +119,7 @@ class Importer:
if os.path.isdir(file): if os.path.isdir(file):
print "BulkImport is not recursive - please select the final directory in which the history files are" print "BulkImport is not recursive - please select the final directory in which the history files are"
else: else:
self.filelist = self.filelist + [dir+os.sep+file] self.filelist = self.filelist + [os.path.join(dir, file)]
#Remove duplicates #Remove duplicates
set(self.filelist) set(self.filelist)
@ -137,6 +137,7 @@ class Importer:
for dir in self.dirlist: for dir in self.dirlist:
for file in os.listdir(dir): for file in os.listdir(dir):
self.filelist = self.filelist + [dir+os.sep+file] self.filelist = self.filelist + [dir+os.sep+file]
set(filelist)
for file in self.filelist: for file in self.filelist:
stat_info = os.stat(file) stat_info = os.stat(file)