Wrong processing of relative file paths in TDOSStream (at least in GO32V2)
Original Reporter info from Mantis: laaca@seznam.cz
-
Reporter name: Ladislav Lacina
Original Reporter info from Mantis: laaca@seznam.cz
- Reporter name: Ladislav Lacina
Description:
It seems that the file streams from unit Objects do something wrong with relative paths.
Look at this simple source:
[code]program teststrm;
uses objects;
var s:TDosStream;
begin
s.Init('.\SUBDIR\FILE.TXT',stOpenRead);
writeln(s.status);
writeln(s.errorinfo);
s.Done;
end.[/code]
If you have existing .\SUBDIR\ and file "FILE.TXT" inside it should print 0 and 0.
But it prints -2 and 3 which means "Invalid file path."
Compiled with FPC 1.0.10 it works as expected.
Steps to reproduce:
Usualy but not in 100% cases it behaves wrongly but very rarely it works OK. Some undefined variable working only when the value is in default value?
Mantis conversion info:
- Mantis ID: 37071
- Build: 3.2.0rc1
- Version: 3.3.1
- Monitored by: » laaca@seznam.cz (Ladislav Lacina)