changes to bootstrip for filename.

This commit is contained in:
Naomi Aro 2011-07-19 17:45:23 +02:00
parent 9de0d490d8
commit 152c87f099
1 changed files with 35 additions and 31 deletions

View File

@ -91,7 +91,7 @@ class AirtimeMediaMonitorBootstrap():
for file_path in new_files:
if len(file_path.strip(" \n")) > 0:
new_and_modified_files.add(file_path[len(dir)+1:])
new_and_modified_files.add(file_path[len(dir):])
"""
new_and_modified_files gives us a set of files that were either copied or modified
@ -114,15 +114,19 @@ class AirtimeMediaMonitorBootstrap():
self.mmc.touch_index_file()
for file_path in deleted_files_set:
self.pe.handle_removed_file(False, "%s/%s" % (dir, file_path))
self.pe.handle_removed_file(False, "%s%s" % (dir, file_path))
deleted_files_set.clear()
for file_path in new_files_set:
file_path = "%s/%s" % (dir, file_path)
file_path = "%s%s" % (dir, file_path)
if os.path.exists(file_path):
self.pe.handle_created_file(False, os.path.basename(file_path), file_path)
new_files_set.clear()
for file_path in modified_files_set:
file_path = "%s/%s" % (dir, file_path)
file_path = "%s%s" % (dir, file_path)
if os.path.exists(file_path):
self.pe.handle_modified_file(False, os.path.basename(file_path), file_path)
modified_files_set.clear()