Unable to open file created for reading using Reset() on Linux
Original Reporter info from Mantis: m7sthe@uni-jena.de @heiko
-
Reporter name: Heiko
Original Reporter info from Mantis: m7sthe@uni-jena.de @heiko
- Reporter name: Heiko
Description:
On Linux, Reset does not allow opening files, even if reading permissions are set - it gives "Access denied" error.
Fixed with: filemode := 0;
The possible filemodes should be documented in the documentation.
Why is the behavior of text and file different?
Steps to reproduce:
$ ls -lisan test
7346791 4 -r--r--r-- 1 1000 1000 2647 Dez 18 09:51 test
---
program my_test;
var f : file;
begin
assign (f,'test');
reset (f,1);
close (f);
end.
---
$ ./my_test
Runtime error 5 at $00000000004010B5
Additional information:
With reference to
http://free-pascal-general.1045716.n5.nabble.com/Type-of-file-mode-variable-td3892186.html
and
http://docwiki.embarcadero.com/Libraries/XE3/en/System.FileMode
Mantis conversion info:
- Mantis ID: 37113
- OS: Linux
- OS Build: 5.6.8
- Platform: x86_64
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 1703 (#b9e28f89)
- Target version: 3.2.0