Modify ↓
Opened 3 years ago
Closed 3 years ago
#3836 closed Bug (Fixed)
FileExists with trailing quotation mark
Reported by: | therks@… | Owned by: | Jon |
---|---|---|---|
Milestone: | 3.3.15.5 | Component: | AutoIt |
Version: | 3.3.15.4 | Severity: | None |
Keywords: | FileExists | Cc: |
Description
Mentioned here first:
https://www.autoitscript.com/forum/topic/206186-fileexists-with-trailing-quote/
For some reason FileExists is treating paths that end with a quote mark (or multiple marks) as valid.
; Assuming File.txt exists: ConsoleWrite(FileExists('File.txt')) ; Returns 1 ConsoleWrite(FileExists('"File.txt"')) ; Returns 0 ConsoleWrite(FileExists('"File.txt')) ; Returns 0 ConsoleWrite(FileExists('File.txt"')) ; Returns 1 ConsoleWrite(FileExists('File.txt""')) ; Returns 1
Attachments (0)
Change History (4)
comment:1 Changed 3 years ago by therks@…
comment:2 Changed 3 years ago by Jpm
- Owner set to Jpm
- Status changed from new to assigned
Fix sent to Jon
comment:3 Changed 3 years ago by anonymous
* ? < > " are wildcards. The results are expected if you consider what " does.
View https://docs.microsoft.com/en-us/archive/blogs/jeremykuhne/wildcards-in-windows
comment:4 Changed 3 years ago by Jon
- Milestone set to 3.3.15.5
- Owner changed from Jpm to Jon
- Resolution set to Fixed
- Status changed from assigned to closed
Fixed by revision [12628] in version: 3.3.15.5
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
The following functions all behave similarly (ignoring the trailing quotation marks and returning valid results):
FileGetAttrib, FileGetLongName, FileGetShortName, FileGetSize, FileGetTime
FileGetVersion behaves expectedly, returning "0.0.0.0"