[BUG] inform user that directory variable ends with `/` and it has to be removed
Closed this issue · 2 comments
nyxnor commented
Is your feature request related to a problem? Please describe.
I want to inform first, lets see if it is easy to do so, it is an error check at the beginning of the scripts with variable expansion.
the bug is that if folder contains trailing /
at the end, the path to the file inside that folder will have two consecutive //
which will fail.
Another option is auto correcting that.... but on the variable on the script itself, not altering the config file, this would be the optimal solution.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
nyxnor commented
#!/usr/bin/env sh
var=/var/lib/tor/
#var=/var/lib/tor
echo "${var%*/}"