diff options
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 98b774a..ffe711a 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -1508,7 +1508,7 @@ class TarFile(object): if hasattr(fileobj, "mode"): self._mode = fileobj.mode self._extfileobj = True - self.name = os.path.abspath(name) + self.name = os.path.abspath(name) if name else None self.fileobj = fileobj # Init attributes. |