hexchat/hexchat — pull request #79 by Arnavion (2012-09-02 03:18:23+00:00)
Title: Fix log_create_pathname to set the correct path

If the user specifies a log filename mask which starts with a "/", then log_create_pathname incorrectly assumes it to be the full path to the log file, since it only checks if the path starts with a "/". I've changed the code to check if the path starts with get_xdir_utf8 () instead of "/".

Note that there are legitimate reasons for the path to start with a "/", such as if the filename mask is "%c/..." (to make logs go into a directory per channel) and %c is the empty string (such as during connecting to a server). In the current build, this causes a nasty error dialog or two to show up complaining that the xchatlogs directory isn't writable.