Closed ThibaultLemaire closed 7 years ago
This could be implemented but why not just ask the user to use the expected syntax rather than doing it and correcting it + warning?
Because it's very common to leave the trailing slash when designating directories. This is not - and should not be - considered a syntax error, at least not in Unix systems.
It is my philosophy that a program should bend to the user, in the limits of what's not too hard to implement. Which is why I was asking if there was a more intricate reason as to why exiting instead of correcting.
And actually, I take back what I said before : The user should not even be notified of this.
So if you're ok with this, please reopen this issue and tag it as enhancement. I can implement it if you don't want to (I'm working on some enhancements anyway).
A PR would be welcomed.
Since trailing slashes in the WHATTOSYNC array cause unwanted behaviour, and since you already have the code to detect that, why not automatically fix it by removing them (while still warning the user), instead of just exiting?