pid_t wait_process(pid_t pid, int *status_ptr, int flags)
{
pid_t waited_pid;
-
+
do {
waited_pid = waitpid(pid, status_ptr, flags);
} while (waited_pid == -1 && errno == EINTR);
if (!dest_path || list_only)
return NULL;
+ /* Treat an empty string as a copy into the current directory. */
+ if (!*dest_path)
+ dest_path = ".";
+
if (daemon_filter_list.head) {
char *slash = strrchr(dest_path, '/');
if (slash && (slash[1] == '\0' || (slash[1] == '.' && slash[2] == '\0')))
exit_cleanup(RERR_SYNTAX);
}
- if (mkdir_defmode(dest_path) != 0) {
+ if (do_mkdir(dest_path, ACCESSPERMS) != 0) {
rsyserr(FERROR, errno, "mkdir %s failed",
full_fname(dest_path));
exit_cleanup(RERR_FILEIO);