now the modification of fname happens it two places -- here and below during the return. Can you move the fname = str (op.abspath (fname)) after this line, then just return fname at the end? That way ...
tarfile sets FNAME field to the path given by user: Lib/tarfile.py:424 It writes full path instead of just basename if user specified absolute path. Some archive viewer apps like 7-Zip may process ...