-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
It seems that adding an extra watch file in the current directory, like .env
, will cause inotify to crash because the os.path.dirname(".env") == ""
. Using ./.env
works though (dirname is then .
) or an absolute path works too.
Lines 84 to 91 in a86ea1e
def add_extra_file(self, filename): | |
dirname = os.path.dirname(filename) | |
if dirname in self._dirs: | |
return | |
self._watcher.add_watch(dirname, mask=self.event_mask) | |
self._dirs.add(dirname) |
Curious what you think? If this is something that should be allowed, then I wonder if you could just do something like this to protect against it:
if not dirname:
dirname = "."
Thanks!
pajod
Metadata
Metadata
Assignees
Labels
No labels