mIRC Home    About    Download    Register    News    Help

Print Thread
$isdir #63656 11/12/03 03:56 AM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
$isdir has a bug in it that will have it return true if .'s are on the end of directories.

Example.

//say $isdir(c:\windows..)


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: $isdir #63657 11/12/03 04:35 AM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
yet again

so I did this

$isfile($+($mp3dir,Game\Final Fantasy\FFX-2\Disk 2\24 - Shitou.mp3..))

and it also returns true.


We don't just write the scripts, we put them to the test! (ScriptBusters)
Re: $isdir #63658 11/12/03 11:52 PM
Joined: Feb 2003
Posts: 2,688
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,688
Have you tried putting one or more dots after a filename or directory? You can't.
If no characters follow these fullstops, it is presumed the file has no extension and the periods are removed/ignored.

Try this experiment:
/run c:\windows..\notepad.exe...

$isfile $isdir are handling this appropriately and should not be changed.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!