Viktor,

another idea could be to open the source file in FO_DENYWRITE mode, so that
the open of the destination file fails while I can still read it from a
different process.

BTW, given that I'm going to copy the source somewhere the assurance that
nobody changes it while I'm copying it could be a good thing.

What do you think about this?

Maurilio.

Viktor Szakáts wrote:
>> Viktor,
>>
>> postinst.prg uses HB_INSTALL_PREFIX to copy those files, and on my PC it
>> points to their current position. So it seems hb_FCopy() does not handle a
>> copy onto itself of a file and truncates it instead.
> 
> That's a pretty huge problem.
> 
> I have to correct myself HB_FCOPY() is my own code, not 
> __COPYFILE() related. Anyhow I don't know how to fix it 
> properly. Probably using hb_fsExtOpen() could help, like 
> in __COPYFILE(), but I'm unsure of exact meaning of all 
> open flags.
> 
> HB_FCOPY() currently opens source in shared mode, and it 
> would be good to keep it that way.
> 
> Any takers?
> 
> Brgds,
> Viktor
> 
> _______________________________________________
> Harbour mailing list (attachment size limit: 40KB)
> [email protected]
> http://lists.harbour-project.org/mailman/listinfo/harbour
> 

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to