diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-05-29 07:30:29 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2015-05-29 07:30:29 +0000 |
commit | f43bfcda9426c1e2ae1942be24be1d3b3de44f94 (patch) | |
tree | ff3c36ac4459bf4009663cd072358ee11c8c8357 | |
parent | bef7db10402a0922854f5bb836bf296077b38bc3 (diff) |
Silently fall back to /etc/magic if ~/.magic can't be opened, ok deraadt stsp
-rw-r--r-- | usr.bin/file/file.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index fb7c7b88516..961b77148d5 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.39 2015/05/28 19:26:37 jmc Exp $ */ +/* $OpenBSD: file.c,v 1.40 2015/05/29 07:30:28 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -174,8 +174,6 @@ main(int argc, char **argv) if (home != NULL) { xasprintf(&magicpath, "%s/.magic", home); magicfp = fopen(magicpath, "r"); - if (magicfp == NULL && errno != ENOENT) - err(1, "%s", magicpath); if (magicfp == NULL) free(magicpath); } |