debug-generator: create prefix dir of generate unit file

Strictly speaking, it's more correct if we create the prefix path before
writing our unit file.
This commit is contained in:
Lennart Poettering
2024-10-15 18:21:04 +02:00
parent 5048a6bd65
commit 518632ce1e
+1 -1
View File
@@ -206,7 +206,7 @@ static int process_unit_credentials(const char *credentials_dir) {
if (!p)
return log_oom();
r = write_string_file_atomic_label(p, d);
r = write_string_file_at_label(AT_FDCWD, p, d, WRITE_STRING_FILE_CREATE|WRITE_STRING_FILE_ATOMIC|WRITE_STRING_FILE_MKDIR_0755);
if (r < 0) {
log_warning_errno(r, "Failed to write unit file '%s' from credential '%s', ignoring: %m",
unit, de->d_name);