From 1ee9309d1549390756ffcbcd6efe0309c951bc67 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Sat, 8 Aug 2020 15:27:01 -0400 Subject: [PATCH] Fixed a long-standing but unnoticed (or unreported) error in which using the "-rcfile" switch fails if running magic from a user home directory. --- utils/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/main.c b/utils/main.c index 42bd033f..1e1c28a1 100644 --- a/utils/main.c +++ b/utils/main.c @@ -940,7 +940,7 @@ mainInitFinal() } } - if (getcwd(cwd, 512) == NULL || strcmp(cwd, home)) + if (getcwd(cwd, 512) == NULL || strcmp(cwd, home) || (RCFileName[0] == '/')) { /* Read in the .magicrc file from the current directory, if */ /* different from HOME. */