Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Other bug (Announce)

posted by Laaca Homepage, Czech republic, 14.05.2020, 10:08
(edited by Laaca on 14.05.2020, 10:27)

:angry:
I think I've found another bug.
It seems that the file streams from unit Objects do something wrong with relative paths.
Look at this simple source:

program teststrm;
uses objects;
var s:TDosStream;
begin
s.Init('.\SUBDIR\FILE.TXT',stOpenRead);
writeln(s.status);
writeln(s.errorinfo);
s.Done;
end.


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.

edit: I've created a bugreport in the Freepascal mantis system.
edit2: It seems that the root of the bug are in the functions FExpand and GetDir in the unit DOS.

---
DOS-u-akbar!

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 407 users online (0 registered, 407 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum