This is the mail archive of the
mailing list for the Cygwin project.
Re: /bin/ gets deleted on error
On 4/13/2017 2:43 PM, Brian Inglis wrote:
> defensive coding is your friend to avoid disasters:
> if [ -n "$foodir" ] && [ -d $foodir/ ]; then
> /bin/rm -fR -- $foodir || exit
> echo "Can't find directory '$foodir'"
> exit 2
And even this can be troublesome if you mistype a variable name anywhere
in this code.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple