On *nix systems the logfilename often contains the ~ character
in place of the home directory path, if not specified with the -l option.
fopen can't handle this and throws errors while writting to logfiles in the
I changed the mechanism so that ~ (as the first character of logdir)
will get overwritten by the correct path.
I also thought about altering the logdir name before it get's into this
but I concluded that the logfunction should handle this "exception" because:
1. It's only a problem on linux systems
2. one shouldn't be concerned about the logdirname/HOME-environment-variable
and assume that functions handling the logdirname work correctly
with the ~ character.
Btw: The patch assumes that if we're not on a WIN32 system, we're on some *nix system using the ~ for the homedirectory,
this may or may not lead to problems if that's not true (didn't find anything on the web for asking the precompiler if we're on a *nix system).
However, it's still safe, if you/other systems don't use the ~ character at the start of the logdirname!
Log in to post a comment.