Modified Paths:
--------------
trunk/harbour/ChangeLog
trunk/harbour/src/rtl/fscopy.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Hi Viktor,
> 2012-04-09 21:33 UTC+0200 Viktor Szakats (harbour syenar.net)
> * src/rtl/fscopy.c
> + using hb_file*() API instead of hb_fs*() API.
> Completing TODO originating from:
> https://groups.google.com/d/msg/harbour-devel/0QY0SJ8HBFU/rWbUvJXygWYJ
> ; review me. I had to add an ugly-looking hack for win, because
> error 38 was returned when reaching the end of file successfully.
> with hb_fs*() API this didn't happen.
This is expected.
FILE IO API does not contain functions fro streaming read/write so
you can expect any errors when you are trying to read out of file
range. I plan to add support for stream IOs to FILE IO API as new
FXO_STREAM flag so we can easy recognize it and block illegal IO
operations.
If you want to use current FILE IO API for such operations then you
should check file size at the beginning and correctly read only
existing part of file. Anyhow in this particular case you also need
fstat() and fchmod() redirection in UNIX builds which do not exist
in FILE IO API and cannot be replaced by tricks with
hb_fileHandle( file )
because they can work only for local files so here we cannot safely
replace hb_fs*() API with hb_file*().
best regards,
Przemek