[haiku-bugs] Re: [Haiku] #5520: IsWritable / IsReadable methods do not currently check Write/Read mode bits.

  • From: "ver" <trac@xxxxxxxxxxxx>
  • Date: Wed, 03 Mar 2010 13:12:28 -0000

#5520: IsWritable / IsReadable methods do not currently check Write/Read mode
bits.
-------------------------------+--------------------------------------------
  Reporter:  ver               |       Owner:  axeld                      
      Type:  enhancement       |      Status:  closed                     
  Priority:  normal            |   Milestone:  R1                         
 Component:  Kits/Storage Kit  |     Version:  R1/Development             
Resolution:  invalid           |    Keywords:  IsWritable IsReadable BFile
 Blockedby:                    |    Platform:  All                        
  Blocking:  5521              |  
-------------------------------+--------------------------------------------
Changes (by ver):

  * blocking:  => 5521


Comment:

 Replying to [comment:3 axeld]:
 > These changes make no sense - if a file is not writable for you, you
 cannot open it read/write anyway, hence the additional check is
 superfluous.

 Why would you set a file mode to r-x if you never check the w?  What is
 the point of IsWritable() otherwise?  To tell me I passed THIS flag when I
 called my BFile constructor? :/

 > Furthermore, we cannot change original Be API, since we aim for binary
 compatibility (ie. if we would actually change such a method, we'd need to
 use symbol versioning in order to make it still work as expected for
 legacy applications).

 Meh, alright, I wasn't aware it would break binary compatibility.  So,
 would the solution be to effectively move this check directly into
 StyledEdit code, in that case?

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

Other related posts: