1

I have a build folder that I want to ignore and inside that build folder, I have a generated-src that I don't want to ignore

root | - build | - lib | - bin ` - generated-src | - src ` - tst

I tried with this syntax:

ignorenot = Path */build/generated-src/*
ignorenot = Path */build/generated-src
ignore = Name */build/*
ignore = Name */build

But it does not work and according to the documentation, this is kind of expected

In particular, putting ignore = Path * in your profile and then using ignorenot to select particular paths to be synchronized will not work

But I still need to do something like this, I though to use Regex to specify the ignore part, but I am not sure how to build it. Maybe can someone help me?

1 Answers1

1

Well, my problem was a bit more complex, and also my build folder was actually a symbolic link. Finally I end up doing this:

# Ignore build folder from the workplace and the package.
# Keep the src-generated sync so you build only on one side.
ignore = Path */build/*
ignore = Path */build
follow = Path */*/*/build
ignore = Path */*/*/build/*
ignorenot = Path */*/*/build/generated-src

The trick is that Path takes exact path, so the globing part is only about the naming, and you need to specific the exact depth of the folder. So ignore = Path */*/*/build/* will ignore everything in the folder, but ignorenot = Path */*/*/build/generated-src will work as expected. So same thing with Name as I did before, does not work.