mirror of https://github.com/python/cpython
OS/2 has no concept of file ownership, like DOS & MS Windows version
prior to NT. EMX has a number of Posix emulation routines, including geteuid() but lacks chown(), so silently skip trying to actually set a file ownership when extracting a file from a tar archive.
This commit is contained in:
parent
4f28c4da36
commit
7970d20792
|
@ -1505,7 +1505,8 @@ class TarFile(object):
|
|||
if tarinfo.issym() and hasattr(os, "lchown"):
|
||||
os.lchown(targetpath, u, g)
|
||||
else:
|
||||
os.chown(targetpath, u, g)
|
||||
if sys.platform != "os2emx":
|
||||
os.chown(targetpath, u, g)
|
||||
except EnvironmentError, e:
|
||||
raise ExtractError, "could not change owner"
|
||||
|
||||
|
|
Loading…
Reference in New Issue