From 74af525d68167aa87c05c7083a2561baf4bdc71d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Fri, 10 Jun 2016 16:20:40 +0300 Subject: [PATCH] unzip.py: minor refactoring --- bin/unzip.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/unzip.py b/bin/unzip.py index a5d3cf3..42bf4db 100755 --- a/bin/unzip.py +++ b/bin/unzip.py @@ -1,7 +1,7 @@ #! /usr/bin/env python """Unzip with encoded filenames - Written by Oleg Broytman. Copyright (C) 2009, 2010 PhiloSoft Design. + Written by Oleg Broytman. Copyright (C) 2009-2016 PhiloSoft Design. """ import sys, os, time @@ -32,9 +32,8 @@ for zinfo in zf.infolist(): print recoded_path if path.startswith('./'): - tgt = os.path.join(out, recoded_path[2:]) - else: - tgt = os.path.join(out, recoded_path) + recoded_path = recoded_path[2:] + tgt = os.path.join(out, recoded_path) tgtdir = os.path.dirname(tgt) if not os.path.exists(tgtdir): -- 2.39.2