diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-07-20 08:55:35 -0400 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2012-07-20 08:55:45 -0400 |
commit | 38bb65c3009cd9578358bd60054ff6f2b714b87c (patch) | |
tree | ec425a575ff657a04f49be37b6ab556f400a37ea /src/lib/Bcfg2/Server/FileMonitor | |
parent | 17f4ac67fd15bb670c0878e227a68d4af92f6144 (diff) | |
download | bcfg2-38bb65c3009cd9578358bd60054ff6f2b714b87c.tar.gz bcfg2-38bb65c3009cd9578358bd60054ff6f2b714b87c.tar.bz2 bcfg2-38bb65c3009cd9578358bd60054ff6f2b714b87c.zip |
strip trailing slashes from inotify watches
Diffstat (limited to 'src/lib/Bcfg2/Server/FileMonitor')
-rw-r--r-- | src/lib/Bcfg2/Server/FileMonitor/Inotify.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py index bf540a1c6..7362432b8 100644 --- a/src/lib/Bcfg2/Server/FileMonitor/Inotify.py +++ b/src/lib/Bcfg2/Server/FileMonitor/Inotify.py @@ -72,6 +72,8 @@ class Inotify(Pseudo, pyinotify.ProcessEvent): self.events.append(evt) def AddMonitor(self, path, obj): + # strip trailing slashes + path = path.rstrip("/") if not os.path.isdir(path): # inotify is a little wonky about watching files. for # instance, if you watch /tmp/foo, and then do 'mv |