- /* If the destination path refers to an existing directory, enter
- * it and use mode 1. If there is something other than a directory
- * at the destination path, we must be transferring one file
- * (anything at the destination will be overwritten). */
- if (safe_stat(dest_path, &st) == 0) {
+ /* See what currently exists at the destination. */
+ if ((statret = safe_stat(dest_path, &st)) == 0) {
+ /* If the destination is a dir, enter it and use mode 1. */