Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* s3cmd: Improved 'fixbucket' command. Thanks to Srinivasa

  Moorthy.



git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@444 830e0280-6d2a-0410-9c65-932aecc39d9d
  • Loading branch information...
commit 189ac97edb2b027b3c8590dcb85e644305636c37 1 parent aad6b45
ludvigm authored
Showing with 7 additions and 0 deletions.
  1. +5 −0 ChangeLog
  2. +2 −0  s3cmd
View
5 ChangeLog
@@ -1,5 +1,10 @@
2010-10-25 Michal Ludvig <mludvig@logix.net.nz>
+ * s3cmd: Improved 'fixbucket' command. Thanks to Srinivasa
+ Moorthy.
+
+2010-10-25 Michal Ludvig <mludvig@logix.net.nz>
+
* s3cmd: Don't fail when a local node is a directory
and we expected a file. (as if for example /etc/passwd
was a dir)
View
2  s3cmd
@@ -1258,6 +1258,7 @@ def cmd_fixbucket(args):
except KeyError:
pass
return text # leave as is
+ text = text.encode('ascii', 'xmlcharrefreplace')
return re.sub("&#?\w+;", _unescape_fixup, text)
cfg.urlencoding_mode = "fixbucket"
@@ -1270,6 +1271,7 @@ def cmd_fixbucket(args):
raise ParameterError("Expecting S3Uri instead of: %s" % arg)
response = s3.bucket_list_noparse(culprit.bucket(), culprit.object(), recursive = True)
r_xent = re.compile("&#x[\da-fA-F]+;")
+ response['data'] = unicode(response['data'], 'UTF-8')
keys = re.findall("<Key>(.*?)</Key>", response['data'], re.MULTILINE)
debug("Keys: %r" % keys)
for key in keys:
Please sign in to comment.
Something went wrong with that request. Please try again.