Archive: Bug in IfFileExists?


Bug in IfFileExists?
I'm creating hyperlinks with NSIS to dirs if the dir exists. Testing the code I found this:

IfFileExists "C:\*.*" returned "EXISTS" in Win2K and "DOES NOT EXIST" in Win98 (and it actually exists :)).

For other dirs (eg: "C:\Program Files\*.*") everything seems to work fine.

I guess this is a bug :(

Greetz,
-Hendri.


If you want to find any file why not use FindFirst?


KiCHiK,

I only want to know if the directory exists. If it does not exist, then the utility will not create a hyperlink to that dir. Otherwise it will. So I need to use IfFileExists.

Thx for your response though :)

Greetz,
-Hendri.


Well, IfFileExists uses FindFirstFile anyway... :)
I have also tried some combinations my self on Win98, nothing seems to work... Must be yet another Microsoft unreferenced feature :D ...


Hmmm...

doesn't sound hopefull :(.
Is there a way to overcome this problem with current NSIS?

-Hendri.


Try searching MSDN, maybe you will find something useful over there...


GetFullPathName $1 "Q:\*.*"
Seems to work prefectly fine on both XP and Win98. It returns an empty string if not found.


Of course, I didn't think of this because I was fixed on IfFileExists too much...

Thx,
-Hendri.