allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject allura git commit: [#8152] encode filename as utf8 bytes so that any nested files/dirs with unicode get deleted properly
Date Mon, 17 Apr 2017 13:01:19 GMT
Repository: allura
Updated Branches:
  refs/heads/master 74d583ee8 -> ff63ae6d4


[#8152] encode filename as utf8 bytes so that any nested files/dirs with unicode get deleted
properly


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/ff63ae6d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ff63ae6d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ff63ae6d

Branch: refs/heads/master
Commit: ff63ae6d4f8dafc4dea79cd25cc5a81362202704
Parents: 74d583e
Author: Dave Brondsema <dave@brondsema.net>
Authored: Fri Apr 14 11:57:18 2017 -0400
Committer: Kenton Taylor <ktaylor@slashdotmedia.com>
Committed: Mon Apr 17 13:00:55 2017 +0000

----------------------------------------------------------------------
 ForgeSVN/forgesvn/model/svn.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/ff63ae6d/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 2a9c480..28545bb 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -708,7 +708,7 @@ class SVNImplementation(M.RepositoryImplementation):
                                 (archive_name, '.zip'))
         tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' %
                                    (archive_name, '.tmp'))
-        rmtree(dest, ignore_errors=True)
+        rmtree(dest.encode('utf8'), ignore_errors=True)  # must encode into bytes or it'll
fail on non-ascii filenames
         path = os.path.join(self._url, path)
         try:
             # need to set system locale to handle all symbols in filename
@@ -722,7 +722,7 @@ class SVNImplementation(M.RepositoryImplementation):
             zipdir(dest, tmpfilename)
             os.rename(tmpfilename, filename)
         finally:
-            rmtree(dest, ignore_errors=True)
+            rmtree(dest.encode('utf8'), ignore_errors=True)
             if os.path.exists(tmpfilename):
                 os.remove(tmpfilename)
 


Mime
View raw message