graysky2 / anything-sync-daemon

Symlinks and syncs user specified dirs to RAM thus reducing HDD/SDD calls and speeding-up the system.
https://wiki.archlinux.org/index.php/Anything-sync-daemon
MIT License
345 stars 45 forks source link

Auto-removing trailing slashes in WHATTOSYNC #42

Closed ThibaultLemaire closed 7 years ago

ThibaultLemaire commented 8 years ago

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?

graysky2 commented 8 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?

ThibaultLemaire commented 8 years ago

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).

graysky2 commented 8 years ago

A PR would be welcomed.