Bug #976
closedIf Exist cmd not working correctly always saying true whether exists or not
0%
Description
From both examples below..problem now using the If Exists cmd
B) The bug of first time no exist (false) and secondtime it does exist (true).
A) The bug always (true) in the latest version whether exists or not.
It should work either way correctly in reality.
..
eg: In the original web live version and previous to that all versions if using just the below a) ver it should work like this. It does not need to open a file first to test, because the if exist does this for you in one go.
..
a) //eg: What Brians, Paul & I have always used, (again which again all worked previously ok).
..
If Exist ("mystupiderfile.txt")
Print "yes" //do this true exists
Else
Print "no" //no not exist.
End If
..
b) //eg:Laurant's example
..
Filename$="toto"
Open Out 1, Filename$
If Exist (Filename$) = False Then Print "do not exist" // test if the file already exist
Print "exist"
Close 1
End
..
//His notes: If you use a file name for first time will say not exist, second time will say it exist
Updated by malcolm harvey about 2 years ago
Strange indeed, this issue seams to have corrected itself using same code after windows updates and also browser updates to ver 108.x today in the aoz edu version anyways.
Says now, no as it should as file does not exist.
I will retest again with later betaoz channel update, and see if still fixed to confirm and if so, then close ticket.
Updated by malcolm harvey almost 2 years ago
It seams to still exist this bug, saying file always exists in browser regardless of whether its there or not.
Leaving ticket open.
Updated by malcolm harvey almost 2 years ago
- Assignee changed from AOZ Studio Team to Baptiste Bideaux
Updated by malcolm harvey almost 2 years ago
- Status changed from New to Closed
The fix or solution for this is to use an = true after the exist() function.
Something changed in recent version now that require this.
eg:
If Exist("mystupiderfile.txt") = True
Print "yes" //do this true exists
Else
Print "no" //no not exist.
End If
Closed ticket.