diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:11 +0000 |
commit | b4f7d8b1566e3220d0e9004499ef9c257e079c57 (patch) | |
tree | ce0468ca8cf21380bef3d2aaacc9fcb30116e757 /src/statoverride | |
parent | Releasing progress-linux version 1.22.6-0.0~progress7.99u1. (diff) | |
download | dpkg-b4f7d8b1566e3220d0e9004499ef9c257e079c57.tar.xz dpkg-b4f7d8b1566e3220d0e9004499ef9c257e079c57.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); |