summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugin.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Plugin.py b/src/lib/Bcfg2/Server/Plugin.py
index 7e7f7db18..58e5dafeb 100644
--- a/src/lib/Bcfg2/Server/Plugin.py
+++ b/src/lib/Bcfg2/Server/Plugin.py
@@ -547,7 +547,10 @@ class DirectoryBacked(object):
return
# Clean up path names
- event.filename = os.path.normpath(event.filename.lstrip('/'))
+ event.filename = os.path.normpath(event.filename)
+ if event.filename.startswith(self.data):
+ # the first event we get is on the data directory itself
+ event.filename = event.filename[len(self.data) + 1:]
# Calculate the absolute and relative paths this event refers to
abspath = os.path.join(self.data, self.handles[event.requestID],