summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/FileMonitor
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-07-20 08:55:35 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-07-20 08:55:45 -0400
commit38bb65c3009cd9578358bd60054ff6f2b714b87c (patch)
treeec425a575ff657a04f49be37b6ab556f400a37ea /src/lib/Bcfg2/Server/FileMonitor
parent17f4ac67fd15bb670c0878e227a68d4af92f6144 (diff)
downloadbcfg2-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.py2
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