[tahoe-dev] [tahoe-lafs] #705: "tahoe mv" unlinks the target even when it is a directory

tahoe-lafs trac at allmydata.org
Thu Jul 16 05:20:31 UTC 2009


#705: "tahoe mv" unlinks the target even when it is a directory
-------------------------------+--------------------------------------------
 Reporter:  zooko              |           Owner:  kevan
     Type:  defect             |          Status:  new  
 Priority:  critical           |       Milestone:  1.5.0
Component:  code-frontend-cli  |         Version:  1.4.1
 Keywords:  reliability        |   Launchpad_bug:       
-------------------------------+--------------------------------------------

Comment(by kevan):

 From what I understand of the implementation of {{{POST
 /uri/$DIRCAP/[SUBDIRS../]?t=rename}}}, the webapi docs are right -- it's
 calling {{{move_child_to}}}
 (source:src/allmydata/dirnode.py at 20090713001320-92b7f-
 fe89f2baaab25c8eb3eb96c146177eb42108aeee#L515) with the {{{new_parent}}}
 argument set to the parent of the child being moved -- if I understand
 things correctly, anyway, that means that we can only use that command to
 move things around within a directory. I'm not sure how easy it'd be to
 tweak that to behave as we'd want.

 The {{{PUT}}} method seems like it'd be easy enough to modify. We could
 check for whatever replace option we wanted to correspond to the behavior
 we want to implement in {{{tahoe_mv.py}}} ({{{only_files}}} is fine by
 me), then examine {{{to_file}}} and {{{self.node}}} in the
 {{{DirectoryNodeHandler}}} to see if they're as they should be -- if so,
 we upload as we do now, and if not, we can raise an exception.

 I realize that I probably seem like a cheerleader for {{{PUT}}} at this
 point, but, given my understanding of the {{{POST}}} method, I'm not aware
 of any better options.

-- 
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/705#comment:19>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid


More information about the tahoe-dev mailing list