You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to set up drive so that when I run drive pull it will only pull the whitelisted files/directories I specify. This kind of turns the .driveignore file on its head, since it's meant to exclude rather than include. I was able to make it work thanks to the work in #535, but it doesn't seem to be fully documented, and I've had a lot of trouble making it make sense.
Eventually, I ended up modifying the regex matching function so it would print out what it was doing, and I found the following behavior:
The regexes listed are matched against the full path from the drive root, including a leading slash.
The regexes are matched against the file name by itself.
At the beginning, a single "/" is matched, as well as the full path to the drive root on the filesystem (e.g. /home/khenriks/myDrive).
If any of these matches indicates a file/path is excluded, then it is.
The behavior in 1 and 2 is non-obvious, but if it were documented it doesn't seem too challenging to work with. But the behavior in 3 seems very strange to me. I can't see any reason someone would want to exclude the entire drive folder, and also matching against the path on disk also doesn't seem useful. I think it would be good to skip 3 entirely.
The text was updated successfully, but these errors were encountered:
I've been trying to set up drive so that when I run
drive pull
it will only pull the whitelisted files/directories I specify. This kind of turns the .driveignore file on its head, since it's meant to exclude rather than include. I was able to make it work thanks to the work in #535, but it doesn't seem to be fully documented, and I've had a lot of trouble making it make sense.Eventually, I ended up modifying the regex matching function so it would print out what it was doing, and I found the following behavior:
If any of these matches indicates a file/path is excluded, then it is.
The behavior in 1 and 2 is non-obvious, but if it were documented it doesn't seem too challenging to work with. But the behavior in 3 seems very strange to me. I can't see any reason someone would want to exclude the entire drive folder, and also matching against the path on disk also doesn't seem useful. I think it would be good to skip 3 entirely.
The text was updated successfully, but these errors were encountered: