From: nicm Date: Sun, 26 Apr 2015 19:53:50 +0000 (+0000) Subject: stat() the original link path not the resolved one which may be relative. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bfe6a2e099dc5c819353626693e9458f64babcdf;p=openbsd stat() the original link path not the resolved one which may be relative. --- 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 @@ -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; } }