mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue