Page 1 of 1 1
Topic Options
#79648 - 2003-04-03 11:30 PM Another potential bug in EXIST() for 4.21RC2
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
It seems that EXIST cannot handle file/foldernames that are enclosed in either single or double quotes. I also seem to have the same problem with MOVE/DEL

code:
break on
cls

$iRC=setoption('WrapAtEOL','ON')

$a='%WINDIR%'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a='"%WINDIR%"'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a="'%WINDIR%'"
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a='%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\*.lnk'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a='"%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\*.lnk"'
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

$a="'%ALLUSERSPROFILE%\Start Menu\Programs\Accessories\*.lnk'"
if exist($a)
? 'Found '+$a
else
? 'Unable to find '+$a
endif

_________________________
There are two types of vessels, submarines and targets.

Top
#79649 - 2003-04-04 12:57 AM Re: Another potential bug in EXIST() for 4.21RC2
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Since Windows XP in some situations expands evironment variables with surrounding double quotes KIX should handle this exception.

But sigle qoutes are leagal charaters in file/folder names, so KiX shouldn't check for single quotes.

I just made this folder on my XP workstation:

C:\'Folder surrounded by single quotes'

-Erik

Top
#79650 - 2003-04-04 03:13 AM Re: Another potential bug in EXIST() for 4.21RC2
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
However, the issue is that if I feed a file/foldername that is delimited by double quotes, then the EXIST will not find that folder.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 756 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.051 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.