diff --git a/Lib/tarfile.py b/Lib/tarfile.py index a293a0492472749..90e3443a98d50f1 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -2227,7 +2227,7 @@ def gettarinfo(self, name=None, arcname=None, fileobj=None): type = FIFOTYPE elif stat.S_ISLNK(stmd): type = SYMTYPE - linkname = os.readlink(name) + linkname = os.readlink(name).replace(os.sep, "/") elif stat.S_ISCHR(stmd): type = CHRTYPE elif stat.S_ISBLK(stmd):