+|| {
+ # Try to remove "current" without changing the exit code. In case the
+ # connection failed without transferring any files, we want the next
+ # backup to be able to run.
+ code=$?
+ rmdir current 2>/dev/null || true
+ exit $code
+}
+mv current "$target"