Modify ↓
Opened 15 years ago
Closed 15 years ago
#1429 closed Feature Request (Rejected)
Change return value of FileGetSize() on failure.
Reported by: | Anonymous | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | Severity: | None | |
Keywords: | Cc: |
Description
Please change the return value of FileGetSize() to -1 when failure occurs. This would make more sense as it is also the way that DirGetSize() works.
Consider the following code.
If Not FileGetSize($sFile) Then FileDelete($sFile)
This code will delete a file if its size is 0. Unfortunately, it would also delete the file if FileGetSize() failed for any reason. Changing the failure return value to -1 would avoid this problem since Not(-1) = False.
Attachments (0)
Change History (1)
comment:1 Changed 15 years ago by Valik
- Resolution set to Rejected
- Status changed from new to closed
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.
Uh, no. If you need to know if an error occurred then check @error. That's why functions set it.