From: kevan Date: Mon, 20 Jul 2009 03:47:46 +0000 (-0700) Subject: Alter directory.py to use parse_replace_arg() X-Git-Tag: allmydata-tahoe-1.5.0~31 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/%22doc.html/%3C?a=commitdiff_plain;h=90677745b3ec196e311b69d3b3d1e7d55cccd088;p=tahoe-lafs%2Ftahoe-lafs.git Alter directory.py to use parse_replace_arg() --- diff --git a/src/allmydata/web/directory.py b/src/allmydata/web/directory.py index db17d090..b57971c1 100644 --- a/src/allmydata/web/directory.py +++ b/src/allmydata/web/directory.py @@ -20,7 +20,7 @@ from allmydata.monitor import Monitor, OperationCancelledError from allmydata import dirnode from allmydata.web.common import text_plain, WebError, \ IOpHandleTable, NeedOperationHandleError, \ - boolean_of_arg, get_arg, get_root, \ + boolean_of_arg, get_arg, get_root, parse_replace_arg, \ should_create_intermediate_directories, \ getxmlfile, RenderMixin, humanize_failure from allmydata.web.filenode import ReplaceMeMixin, \ @@ -155,7 +155,8 @@ class DirectoryNodeHandler(RenderMixin, rend.Page, ReplaceMeMixin): def render_PUT(self, ctx): req = IRequest(ctx) t = get_arg(req, "t", "").strip() - replace = boolean_of_arg(get_arg(req, "replace", "true")) + replace = parse_replace_arg(get_arg(req, "replace", "true")) + if t == "mkdir": # our job was done by the traversal/create-intermediate-directory # process that got us here.