-
-if ((fstat(ddfd, &dstatbuf)) < 0)
- {
- addr->transport_return = PANIC;
- addr->basic_errno = errno;
- addr->message = string_sprintf("%s transport fstat on directory fd: "
- "%s failed with error: %s", tblock->name, ob->dirname, strerror(errno));
- goto RETURN;
- }
-
-sourcedir = spool_dname(US"input", message_subdir);
-/*
-message_subdir[1] = '\0';
-message_subdir[0] = split_spool_directory? message_id[5] : 0;
-sourcedir = string_sprintf("%s/%s/%s", spool_directory,
- US"input", message_subdir);
-*/
-
-if ((sdfd = Uopen(sourcedir, dfd_oflags, 0)) < 0)
+if ( (s = ob->dirname,
+ (ddfd = Uopen(s, O_RDONLY | O_DIRECTORY | O_NOFOLLOW, 0)) < 0)
+ || (s = sourcedir,
+ (sdfd = Uopen(sourcedir, O_RDONLY | O_DIRECTORY | O_NOFOLLOW, 0)) < 0)
+ )