From 62f4f330fc5ed840eba9d32da353afe789e2805b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 11 Sep 2012 21:52:33 -0700 Subject: [PATCH] egencache: encode unicode file paths safely This will fix cases similar to the one fixed in commit f01d7a8ca158ec60df76a3e8ae5b80ac3f62429e for bug #310789. --- bin/egencache | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/egencache b/bin/egencache index f7b447130..003567452 100755 --- a/bin/egencache +++ b/bin/egencache @@ -541,7 +541,8 @@ class GenUseLocalDesc(object): for cp in self._portdb.cp_all(): metadata_path = os.path.join(repo_path, cp, 'metadata.xml') try: - metadata = ElementTree.parse(metadata_path, + metadata = ElementTree.parse(_unicode_encode(metadata_path, + encoding=_encodings['fs'], errors='strict'), parser=ElementTree.XMLParser( target=_MetadataTreeBuilder())) except IOError: -- 2.26.2