mIRC Homepage
Posted By: t0m pb with filetest identifiers - 03/04/04 01:14 AM
hi,

im currently scripting something that reads its configuration from files. one of them is named pipe.conf and even if it does exists my error checking routine reports its missing. i figured it was the filetest identifers $exists and $isfile not wanting to return true because the file is named 'pipe'.
i havnt had a chance to elaborate some tests to check for other reserved words preventing these identifiers from working correctly (touch files, check if they exists; i might do that later). aint checked $isdir either but i suppose it has the same problem.
Posted By: starbucks_mafia Re: pb with filetest identifiers - 03/04/04 02:14 PM
Couldn't reproduce here (98SE and XP Home), $exists() and $isfile() worked correctly for files called 'pipe.conf' and just 'pipe'.

You might want to check you're looking in the right folder for the file (maybe you're using $scriptdir in one place and $mircdir in another), or perhaps it's a logic bug in your error checking.

Which OS are you using?
Posted By: MonoSex Re: pb with filetest identifiers - 03/04/04 02:20 PM
Yep, i can reproduce it. Both $isfile and $exsists returns $false, but $file seems to work correctly, you can use it as a workaround.
WinXP Pro SP1.
Posted By: t0m Re: pb with filetest identifiers - 03/04/04 07:03 PM
i forgot:
it does that since 614.
Posted By: starbucks_mafia Re: pb with filetest identifiers - 03/04/04 10:31 PM
My mistake, turns out I'd forgotten to upgrade to 6.14 on my XP system. The bug is present in XP Home (although 98SE is unaffected). Also strange things with using pipe:
Get a 'Cannot create file...' error when trying to /write to 'pipe.conf'. Also, /mkdir pipe returns an error, but still creates the folder. And $isdir(pipe) will return $false, however $isdir(pipe\) will return $true. Bizarre.
© mIRC Discussion Forums