summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexamples/monkeysphere-monitor-keys5
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/monkeysphere-monitor-keys b/examples/monkeysphere-monitor-keys
index a5877d6..c5d0a0f 100755
--- a/examples/monkeysphere-monitor-keys
+++ b/examples/monkeysphere-monitor-keys
@@ -104,6 +104,7 @@ sub get_watcher {
push(@dirs,$dir);
my $file = basename($file);
if ( !grep $_ eq $file, @filters ) {
+ $file = quotemeta($file);
debug("Adding file filter: %s\n", $file);
push(@filters,$file);
}
@@ -111,10 +112,6 @@ sub get_watcher {
}
# create combined file filters to limit our monitor
-
- # FIXME: what if the elements of @filters have some regex characters
- # in them? this seems like it could match all kinds of crazy stuff
-
my $filter = '^(' . join("|",@filters) . ')$';
# return a watcher object