[fpc-pascal] TFileStream.Create and hidden files on Windows

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Thu Jan 15 19:24:16 CET 2015


Bart wrote:
> On 1/15/15, Michael Van Canneyt <michael at freepascal.org> wrote:
> 
>> It seems strange that rewrite/reset handles it, because a quick search
>> reveals
>> that there is no handling of FILE_ATTRIBUTE_HIDDEN in the RTL.
> 
> Reset handles it, rewrite not (access denied (GetLastOSError = 5)).
> TFileStream.Create with fmCreate also fails, but with GetLasOSError =
> 6 (invalid entry).
> 
> Chances are I replaced some Resets with TFileStream.Create when saving
> the file in question.
> 
> So, in the end it's all my own doing.
> 
> Sorry for wasting your time.

Although it also affects TInifile on Windows, which has made your 
comments interesting.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list