incron icon indicating copy to clipboard operation
incron copied to clipboard

Some monitored path changes automatically

Open bialyikar opened this issue 5 years ago • 2 comments

Hello. I have a problem that the path to the monitored directory changes automatically after it is saved. incrontab -e looks like this:

/home/melon/Gry/Steam/steamapps/compatdata/4500/pfx/drive_c/documents and settings/all users/documents/stalker-shoc/savedgames/ IN_CREATE /bin/bash /home/melon/Test/incron_test.sh "$#"

but after saving it, /documents and settings/ changes to /documents 0 settings/. I don't understand why "and" changes to "0".

I have a similar path with a different one. The steps he takes are: incrontab -e /home/melon/Gry/Steam/steamapps/common/Gothic II/Saves/ IN_CREATE /bin/bash /home/melon/Test/incron_test.sh $@ $# Ctrl + o to save. incrontab -d When I do it again: incrontab -e Instead of the added command: /home/melon/Gry/Steam/steamapps/common/Gothic II/Saves/ IN_CREATE /bin/bash /home/melon/Test/incron_test.sh $@ $# I have: /home/melon/Gry/Steam/steamapps/common/Gothic 0 IN_CREATE /bin/bash /home/melon/Test/incron_test.sh $@ $#

bialyikar avatar May 12 '20 18:05 bialyikar

You need to surround the path with quotes in bash to support spaces. I suggest something like: "/home/melon/Gry/Steam/steamapps/common/Gothic II/Saves/" IN_CREATE /bin/bash /home/melon/Test/incron_test.sh "$@" "$#"`

dandalf avatar Jul 02 '20 16:07 dandalf

You need to surround the path with quotes in bash to support spaces. I suggest something like: "/home/melon/Gry/Steam/steamapps/common/Gothic II/Saves/" IN_CREATE /bin/bash /home/melon/Test/incron_test.sh "$@" "$#"`

What version are you using that support this? I have tried with 0.5.12 and it doesn't seem to work.

kevin201 avatar Feb 09 '21 08:02 kevin201