File IO Assign works with exxtremely long paths, but rewrite/rest fails
Original Reporter info from Mantis: Thaddy
-
Reporter name: Thaddy de Koning
Original Reporter info from Mantis: Thaddy
- Reporter name: Thaddy de Koning
Description:
Classic File IO behaves erratic:
Assign can handle paths > 255, but subsequent operations fail
Steps to reproduce:
program q;
{$H+}{$I-}
uses Sysutils;
var
F: File Of byte;
path: ansistring;
begin
path:='/tmp/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/1234567890/';
forcedirectories(path);
path := path+'test.txt';
WriteLn ('Opening ',path);
Assign (F,path);
if IOResult = 0 then writeln('Assign works') else writeln('Assign does not work');
Reset (F);
if IOResult = 0 then writeln('Reset works') else writeln('Reset does not work');
Close (F);
if IOResult = 0 then writeln('Close works') else writeln('Close does not work');
end.
Mantis conversion info:
- Mantis ID: 32939
- OS: debian
- OS Build: Jessie
- Build: 37880
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 1455 (#bfd1ee0a)
- Target version: 3.2.0