]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfile-util: do not skip CLEANUP_TMPFILE_AT for AT_FDCWD
authorMike Yuan <me@yhndnzj.com>
Wed, 4 Feb 2026 01:15:49 +0000 (02:15 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 11 Feb 2026 01:39:25 +0000 (02:39 +0100)
Preparation for later commits.

src/basic/tmpfile-util.c

index 2be44dcd77772e91b25618cb6b5e54bf4ff6ce8d..be7a930c44c186f4e2eb78f2aae378e5abdfec96 100644 (file)
@@ -437,7 +437,7 @@ void cleanup_tmpfile_data_done(struct cleanup_tmpfile_data *d) {
         assert(d);
 
         if (!d->dir_fd ||
-            *d->dir_fd < 0 ||
+            (*d->dir_fd < 0 && *d->dir_fd != AT_FDCWD) ||
             !d->filename ||
             !*d->filename)
                 return;