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:
parent
0a532f5721
commit
1ee9309d15
|
|
@ -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 */
|
/* Read in the .magicrc file from the current directory, if */
|
||||||
/* different from HOME. */
|
/* different from HOME. */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue