mIRC Home    About    Download    Register    News    Help

Print Thread
#77626 03/04/04 01:14 AM
Joined: Mar 2003
Posts: 16
T
t0m Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Mar 2003
Posts: 16
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.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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?


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Dec 2002
Posts: 395
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
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.

Joined: Mar 2003
Posts: 16
T
t0m Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Mar 2003
Posts: 16
i forgot:
it does that since 614.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard