Fixed a long-standing but unnoticed (or unreported) error in which

using the "-rcfile" switch fails if running magic from a user home
directory.
This commit is contained in:
Tim Edwards
2020-08-08 15:27:01 -04:00
parent 0a532f5721
commit 1ee9309d15
+1 -1
View File
@@ -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. */