Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-09

FileIsWritable (win32)

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

I noticed sometimes the editor works and sometimes it doesn't in win32. It turned out that FileIsWritable has a bug.
A file is writable if it hasn't set the readonly flag. Line 434 of filectrl.inc should be:

  Result:=((FileGetAttr(AFilename) and faReadOnly)=0);

Check the equal sign at the end.
Regards,
Vincent.

Reply by email

Mattias Gaertner
to Vincent Snijders
Show quoted text 9 lines
Hi, I noticed sometimes the editor works and sometimes it doesn't in win32. It turned out that FileIsWritable has a bug. A file is writable if it hasn't set the readonly flag. Line 434 of filectrl.inc should be: Result:=((FileGetAttr(AFilename) and faReadOnly)=0); Check the equal sign at the end.

Thanks for the hint.

Mattias

Reply by email