[haiku-bugs] Re: [Haiku] #5521: StyledEdit does not check read-only status of a file prior to writing to it.

  • From: "axeld" <trac@xxxxxxxxxxxx>
  • Date: Wed, 03 Mar 2010 13:07:35 -0000

#5521: StyledEdit does not check read-only status of a file prior to writing to
it.
---------------------------------------+------------------------------------
 Reporter:  ver                        |       Owner:  korli    
     Type:  enhancement                |      Status:  new      
 Priority:  low                        |   Milestone:  R1       
Component:  Applications/StyledEdit    |     Version:  R1/alpha1
 Keywords:  stylededit save read-only  |   Blockedby:           
 Platform:  All                        |    Blocking:           
---------------------------------------+------------------------------------
Changes (by axeld):

  * blockedby:  5520 =>


Comment:

 Besides that #5520 has been marked as invalid, your patch also contains a
 number of style violations - we do have a coding style and require all of
 our own sources to comply to it.

 Anyway, StyledEdit obviously issues no warning, as writing actually
 succeeds (since you are the root user), so the file is writable after all.
 I guess it would make sense to check for the writable bit being set; so
 while this patch isn't adequate, I'm keeping the bug open.

 BTW: Instead of fstat(), there is also a BFile::GetStat() inherited from
 BStatable.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/5521#comment:2>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: