Skip to content
Snippets Groups Projects
Commit e533f355 authored by Manuela Kuhn's avatar Manuela Kuhn
Browse files

Fixed error if one monitored subfolder does not exist

parent d4fd8e70
No related branches found
No related tags found
No related merge requests found
......@@ -138,11 +138,14 @@ class InotifyDetector():
# Walk the tree
for folder in foldersToWalk:
monitoredFolders.append(folder)
for root, directories, files in os.walk(folder):
# Add the found folders to the list for the inotify-watch
monitoredFolders.append(root)
self.log.info("Add folder to monitor: " + str(root))
if os.path.isdir(folder):
monitoredFolders.append(folder)
for root, directories, files in os.walk(folder):
# Add the found folders to the list for the inotify-watch
monitoredFolders.append(root)
self.log.info("Add folder to monitor: " + str(root))
else:
self.log.info("Folder does not exists: " + str(folder))
return monitoredFolders
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment