mIRC Homepage
Posted By: Jigsy Log filename length bug - 05/06/08 01:19 AM
In the theme of logs (It was either post here, or start a new thread.), mIRC has problems with logs when joining a channel with a name longer than 188 characters.

Quote:

* Error opening log file 'C:\Documents and Settings\Jigsy\My Documents\Irc\AxisIRC\#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.20080605.log'
[02:17:58] * Now talking in #aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Posted By: Khaled Re: Log filename length bug - 05/06/08 09:14 AM
This is due to a Windows API limit. For non-Unicode applications, the maximum path for a file is 256 characters. The only solution I can think of would be to make mIRC chop the filename length to the maximum allowed. However that would result in one log file being used for all channel/query names longer than this maximum length.
Posted By: Khaled Re: Log filename length bug - 17/06/08 11:42 AM
I looked into this a little more. By using the unicode version of the Windows file creation API (which indicates that filenames up to 32000 characters in length can be created) I was able to make mIRC create filenames longer than 260 characters under Windows XP - but only slightly longer. I was unable to view/delete/rename these files in Windows explorer. I had to go into the DOS prompt to remove them. It looks like XP has very limited practical support for filenames longer than 260 characters. I'll be changing the file routines in mIRC to truncate filenames (including path) at 260 characters.
© mIRC Discussion Forums