mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
ddfbd74607
This currently fails exactly when it is needed: when there is a dangling link pointing into an unmounted filesystem. This happens because [ -e <dangling-link> ] returns false. The solution is simply to remove that check. Now the first condition in the "if" statement catches the backward compatibility case where $GANRECDIR used to be a directory. It will also catch other problems, such as if a file has been created in this location. If nothing exists then it will silently succeed (due to -f). The second case catches a symlink pointing to the wrong place (e.g. in an unmounted filesystem). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>