]> git.llucax.com Git - software/bacap.git/commit
Avoid creation of dangling symlinks
authorRodrigo Campos <rodrigo@sdfg.com.ar>
Wed, 2 Feb 2011 14:24:30 +0000 (11:24 -0300)
committerLeandro Lucarella <luca@burns.springfield.home>
Wed, 2 Feb 2011 16:42:49 +0000 (13:42 -0300)
commitd0d3410ecd3b922c2e01af5fec41adf10e916ea7
treea6b536a203b3b0d8b4356aff7431a721e589db6a
parent18dd956085ae52ff407fc05e8d744976f7f91cc5
Avoid creation of dangling symlinks

If rsync fails, possibly the new directory does not exist, so we should
not create the symlink. Because if we create it, the next backup would
not be incremental, because the --link-dest option does not point to an
existing directory.

This patch fixes this by checking the return code of rsync and only
creates the symlink if rsync exits successful or with error 24 ("Partial
transfer due to vanished source files") which is somewhat expected.

Signed-off-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
bacap