Opened 14 years ago

Closed 14 years ago

#1515 closed Bug (Fixed)

FileOpen for Read fails on already opened file

Reported by: M23 Owned by: Jon
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


From v3.3.5.3 Beta release notes:
Fixed: Regression in FileOpen() where it wasn't allowed to open files in read mode if they were already open in write mode.

In v3.3.6.0 you cannot open a file for reading if it is already open:

$h_write = FileOpen('test.txt', 1)

$h_read = FileOpen('test.txt', 0)
If $h_read = -1 Then
    MsgBox(0, @AutoItVersion, 'Failed to open handle for read')


The same happens when the file is opened in other apps (although I have now learnt that Notepad does NOT lock its open files).

Raised in - post # 6 and onwards.


Attachments (0)

Change History (2)

comment:1 Changed 14 years ago by anonymous

Also You can't open the same file for reading and for writing. This was possible with the previous versions until 3.3.2.

comment:2 Changed 14 years ago by Jon

  • Milestone set to
  • Owner set to Jon
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5753] in version:

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.

Add Comment

Modify Ticket

as closed The owner will remain Jon.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.