[haiku-bugs] Re: [Haiku] #8321: Symbolic link is followed when replacing a file!

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Sat, 11 Feb 2012 23:23:31 -0000

#8321: Symbolic link is followed when replacing a file!
--------------------------------+----------------------------
   Reporter:  Pete              |      Owner:  axeld
       Type:  bug               |     Status:  new
   Priority:  normal            |  Milestone:  R1
  Component:  Kits/Storage Kit  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------
Changes (by Pete):

 * owner:  korli => axeld
 * component:  Applications/StyledEdit => Kits/Storage Kit


Comment:

 Replying to [comment:6 anevilyak]:
 > Replying to [comment:5 Pete]:
 > > OK -- glad that you think it not quite right, too.  I don't see it as
 the application's job to fix it, though.  Shouldn't this be the
 FilePanel's responsibility?  Having the alert give a choice of replacing
 either the link itself or the file it references might be the best route.
 >
 > No, it's the application. All the file panel does is select a file, it's
 in no way responsible for the subsequent modifications, and it does in
 fact give back a reference to the symbolic link.

 I see your point.  I'd forgotten that the FilePanel just passes the
 requested name for a save.  (I'd also forgotten that a BFile does an
 automatic traverse if the name is a symlink -- even for a write.)

 This makes things awkward.  If some apps follow one convention and others
 another, the user is going to get very frustrated.  And good luck getting
 all third-party apps converted!

 At least, as Ingo suggests, the alert can be improved, at the expense of
 verbosity.  Maybe:

 {{{
    "The symlink "name" already exists in the specified folder.
     Saving to it may overwrite the original file linked to.
     Do you really want to replace it?"
 }}}

 (I've changed the Component back to Storage Kit, as this problem is
 relevant to most apps, not just StyledEdit.)

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

Other related posts: