]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
CLI mv: if we can't created the new child, don't delete the old one
authorBrian Warner <warner@allmydata.com>
Tue, 20 May 2008 19:49:47 +0000 (12:49 -0700)
committerBrian Warner <warner@allmydata.com>
Tue, 20 May 2008 19:49:47 +0000 (12:49 -0700)
src/allmydata/scripts/tahoe_mv.py

index 6b33ba9d6fe07f432908d296d3be261328475cc7..d3867d8ab8dfd23fe54d062fc891c957bd347a9c 100644 (file)
@@ -35,6 +35,8 @@ def mv(nodeurl, aliases, from_file, to_file, stdout, stderr):
     if not re.search(r'^2\d\d$', str(status)):
         print >>stderr, "error, got %s %s" % (resp.status, resp.reason)
         print >>stderr, resp.read()
+        print >>stderr, "NOT removing the original"
+        return
 
     # now remove the original
     resp = do_http("DELETE", from_url)