[diffoscope] 03/05: comparators: gzip: replaced dest_path gen by self.get_path_name

Juliana Oliveira R jwnx-guest at moszumanska.debian.org
Sat Sep 16 17:43:11 CEST 2017


This is an automated email from the git hooks/post-receive script.

jwnx-guest pushed a commit to branch jwnx_fix_different_container_type_comparison
in repository diffoscope.

commit fab869c1611cd70d2e3b6a38d2cba3262103853c
Author: Juliana Oliveira Rodrigues <juliana.orod at gmail.com>
Date:   Sat Sep 16 12:24:40 2017 -0300

    comparators: gzip: replaced dest_path gen by self.get_path_name
    
    Replaced local dest_path generation by get_path_name method.
    Avoids possible OSErrors caused by a too long filename after container
    extraction.
---
 diffoscope/comparators/gzip.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/diffoscope/comparators/gzip.py b/diffoscope/comparators/gzip.py
index 70cbc02..6dd1d0b 100644
--- a/diffoscope/comparators/gzip.py
+++ b/diffoscope/comparators/gzip.py
@@ -18,7 +18,6 @@
 # along with diffoscope.  If not, see <https://www.gnu.org/licenses/>.
 
 import re
-import os.path
 import logging
 import subprocess
 
@@ -44,7 +43,7 @@ class GzipContainer(Archive):
 
     @tool_required('gzip')
     def extract(self, member_name, dest_dir):
-        dest_path = os.path.join(dest_dir, member_name)
+        dest_path = self.get_path_name(dest_dir)
         logger.debug('gzip extracting to %s', dest_path)
         with open(dest_path, 'wb') as fp:
             subprocess.check_call(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list