If a module has no path setting, return an error.

This commit is contained in:
Wayne Davison
2010-02-06 13:40:12 -08:00
parent 0d78a27893
commit afccb3d326

View File

@@ -613,6 +613,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
}
module_dir = lp_path(i);
if (*module_dir == '\0') {
rprintf(FLOG, "No path specified for module %s\n", name);
io_printf(f_out, "@ERROR: no path setting.\n");
return -1;
}
if (use_chroot) {
if ((p = strstr(module_dir, "/./")) != NULL) {
*p = '\0'; /* Temporary... */