diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
commit | 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch) | |
tree | 9532e637f47d6ff7246ccbabb62d4e2b4b5908df /src/statoverride | |
parent | Adding debian version 1.22.6. (diff) | |
download | dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip |
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/statoverride')
-rw-r--r-- | src/statoverride/main.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/statoverride/main.c b/src/statoverride/main.c index 07c8757..1ba091f 100644 --- a/src/statoverride/main.c +++ b/src/statoverride/main.c @@ -26,7 +26,7 @@ #include <sys/stat.h> #include <errno.h> -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H #include <locale.h> #endif #include <string.h> @@ -280,14 +280,13 @@ statoverride_add(const char *const *argv) varbuf_add_str(&realfilename, dpkg_fsys_get_dir()); varbuf_add_str(&realfilename, filename); - varbuf_end_str(&realfilename); - if (stat(realfilename.buf, &st) == 0) { + if (stat(varbuf_str(&realfilename), &st) == 0) { (*filestat)->mode |= st.st_mode & S_IFMT; - statdb_node_apply(realfilename.buf, *filestat); + statdb_node_apply(varbuf_str(&realfilename), *filestat); } else if (opt_verbose) { warning(_("--update given but %s does not exist"), - realfilename.buf); + varbuf_str(&realfilename)); } varbuf_destroy(&realfilename); |