summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/file.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-04-26 19:53:50 +0000
committernicm <nicm@openbsd.org>2015-04-26 19:53:50 +0000
commitbfe6a2e099dc5c819353626693e9458f64babcdf (patch)
tree6fc8faa5fa9a335f17edf87422793418e8ca1bed /usr.bin/file/file.c
parentFix typo in the buffer size value: 7680 in the manpage vs 7860 in (diff)
downloadwireguard-openbsd-bfe6a2e099dc5c819353626693e9458f64babcdf.tar.xz
wireguard-openbsd-bfe6a2e099dc5c819353626693e9458f64babcdf.zip
stat() the original link path not the resolved one which may be relative.
Diffstat (limited to 'usr.bin/file/file.c')
-rw-r--r--usr.bin/file/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c
index 02f5f24296d..84bedfff150 100644
--- a/usr.bin/file/file.c
+++ b/usr.bin/file/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.32 2015/04/24 17:34:57 nicm Exp $ */
+/* $OpenBSD: file.c,v 1.33 2015/04/26 19:53:50 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -250,7 +250,7 @@ read_link(struct input_file *inf)
if (stat(inf->path, &inf->sb) == -1)
inf->error = strerror(errno);
} else {
- if (stat(inf->link_path, &sb) == -1)
+ if (stat(inf->path, &sb) == -1)
inf->link_target = errno;
}
}