Some inplace-checking code should have been inside the #ifdef that
[rsync/rsync.git] / options.c
index 9a021c3..14c60ce 100644 (file)
--- a/options.c
+++ b/options.c
@@ -145,7 +145,7 @@ static int daemon_opt;   /* sets am_daemon after option error-reporting */
 static int modify_window_set;
 static int compare_dest = 0;
 static int basis_dir_cnt = 0;
-static char *dest_option;
+static char *dest_option = NULL;
 static char *max_size_arg;
 
 /** Local address to bind.  As a character string because it's
@@ -952,18 +952,18 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                        return 0;
                }
                keep_partial = 0;
+               if (dest_option) {
+                       snprintf(err_buf, sizeof err_buf,
+                                "--inplace does not yet work with %s\n",
+                                dest_option);
+                       return 0;
+               }
 #else
                snprintf(err_buf, sizeof err_buf,
                         "--inplace is not supported on this %s\n",
                         am_server ? "server" : "client");
                return 0;
 #endif
-               if (compare_dest || copy_dest || link_dest) {
-                       snprintf(err_buf, sizeof err_buf,
-                                "--inplace does not yet work with %s\n",
-                                dest_option);
-                       return 0;
-               }
        } else {
                if (keep_partial && !partial_dir)
                        partial_dir = getenv("RSYNC_PARTIAL_DIR");