mIRC Home    About    Download    Register    News    Help

Print Thread
Log filename length bug #200400 05/06/08 01:19 AM
Joined: Nov 2004
Posts: 826
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 826
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

Last edited by Khaled; 05/06/08 08:57 AM.

What do you do at the end of the world? Are you busy? Will you save us?
Re: Log filename length bug [Re: Jigsy] #200424 05/06/08 09:14 AM
Joined: Dec 2002
Posts: 5,020
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,020
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.

Re: Log filename length bug [Re: Jigsy] #201033 17/06/08 11:42 AM
Joined: Dec 2002
Posts: 5,020
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,020
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.