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:
Andrew MacIntyre 2003-02-19 12:51:34 +00:00
parent 4f28c4da36
commit 7970d20792
1 changed files with 2 additions and 1 deletions

View File

@ -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"