X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/0a56ef128c7be9b91db00a7941375bd8f103ff53..d7205694223490eb20bb968f725859575eb8e643:/main.c diff --git a/main.c b/main.c index 407568d8..bef22f98 100644 --- a/main.c +++ b/main.c @@ -43,6 +43,7 @@ extern int kluge_around_eof; extern int got_xfer_error; extern int msgs2stderr; extern int module_id; +extern int read_only; extern int copy_links; extern int copy_dirlinks; extern int copy_unsafe_links; @@ -764,7 +765,7 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[]) exit_cleanup(RERR_SYNTAX); return; } - if (am_daemon && lp_read_only(module_id) && remove_source_files) { + if (am_daemon && read_only && remove_source_files) { rprintf(FERROR, "ERROR: --remove-%s-files cannot be used with a read-only module\n", remove_source_files == 1 ? "source" : "sent"); @@ -950,7 +951,7 @@ static void do_server_recv(int f_in, int f_out, int argc, char *argv[]) argc, (long)getpid()); } - if (am_daemon && lp_read_only(module_id)) { + if (am_daemon && read_only) { rprintf(FERROR,"ERROR: module is read only\n"); exit_cleanup(RERR_SYNTAX); return;