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

2015-01-15 Thread Bart
Hi, I have some old tools lying around that are still in use, and I modernized them a bit. One part of that is to replace file handling with FileStreams whenever apllicable. This all went without major hickups, until one of my tools suddenly crashed. Where in the past it did a Rewrite(Filevar,1)

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

2015-01-15 Thread Michael Van Canneyt
On Thu, 15 Jan 2015, Bart wrote: Hi, I have some old tools lying around that are still in use, and I modernized them a bit. One part of that is to replace file handling with FileStreams whenever apllicable. This all went without major hickups, until one of my tools suddenly crashed. Where i

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

2015-01-15 Thread Bart
On 1/15/15, Michael Van Canneyt 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 fai

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

2015-01-15 Thread Mark Morgan Lloyd
Bart wrote: On 1/15/15, Michael Van Canneyt 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 fmCreat