diff --git a/README.md b/README.md index 6c09694..a2a289e 100644 --- a/README.md +++ b/README.md @@ -61,4 +61,4 @@ The folder name is the 11 character unique string found in the syncthing GUI. Th An example: a script at the location `~/.syncthing-hooks/night-owlzz-5m` will be executed five minutes after the most recent event in the folder with the identifier `night-owlzz`. -Don't forget to `chmod +x` the script. +Make sure your folder identifier is exactly 11 characters long and does not have an extension. Also, don't forget to `chmod +x` the script. diff --git a/hooks.js b/hooks.js index 19c0531..bd5fb42 100644 --- a/hooks.js +++ b/hooks.js @@ -21,7 +21,7 @@ const parseHooks = (root, hooks) => hooks .map(x => ({ path: path.join(root, x), - match: x.match(/(?.*)-(?