The only files I want to sync are the ones beginning with backup (case-insensitive). I thought about using the .stignore file for that, but so far, my attempts to do so have all failed. I tried:
// First try
(?i)!backup*
*
// Second try
(?i)!backup*
!/
/*
*
// Third try
(?i)!backup*
!./
./*
*
Two oddities:
1- The first line makes both files beginning with backup and Backup to sync. This is unexpected! If I use (?i)!/backup* instead, it wont work.
2- Switching lines 2 and 3 causes it to stop working. Why is that?
@calmh: Thanks! Btw that looks like my first attempt (I forgot to include), which was:
*(?i)!backup**
*
There seems to be no mention of that in the docs, but anyway, I feel that the pattern using (?i) should work as well - but it doesn’t.
There are also a few other places where it would make sense to behave in a case-insensitive manner on proper OSes, for consistency, so I’d vote for that.
I don’t have the code in front of me, but I suspect that what happens is that your (?i)backup actually gets turned into (?i)(?i)backup on case insensitive OS:es, which then doesn’t work. It should work, of course, so that’s a bug in that case.
It won’t turn into (?i)(?i), link.
However, it could turn into (?i)*(?i) because of the TrimPrefix…
I think the documentation should state that (?i) should be stated in front because some ppl might want to filter myfolder with (?i) in its name.