[tahoe-dev] [tahoe-lafs] #903: webapi t=mkdir: behavior when directory already exists?
tahoe-lafs
trac at allmydata.org
Thu Jan 14 14:31:30 PST 2010
#903: webapi t=mkdir: behavior when directory already exists?
-------------------------------+--------------------------------------------
Reporter: warner | Owner:
Type: defect | Status: new
Priority: minor | Milestone: undecided
Component: code-frontend-web | Version: 1.5.0
Keywords: | Launchpad_bug:
-------------------------------+--------------------------------------------
I'm not entirely clear on what the webapi {{{POST
/uri/$DIRCAP/[SUBDIRS../]SUBDIR?t=mkdir}}} calls should do when the given
subdirectory already exists. The docs state that for the regular t=mkdir
case (i.e. creating an empty mutable directory), "If the named target
directory already exists, this will make no changes to it". I believe this
is fine.
But for the other cases (t=mkdir-with-children, t=mkdir-immutable), the
situation gets more interesting. We need to signal whether the new
directory was created (and thus has the new contents provided by these
calls), or if it already existed (and therefore still has some old
contents). There should also be a clear way for the caller to indicate
whether they want to get an error when the directory already exists, or if
this "return anyways" behavior is ok.
In other calls, we have a "replace=" parameter which is related to this.
There was some incomplete code for replace= in mkdir-immutable, and some
slightly more complete code in mkdir-with-children, but I don't think the
semantics are well defined yet.
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/903>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list