summaryrefslogtreecommitdiffstats
path: root/Lib/tarfile.py
diff options
context:
space:
mode:
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>2003-02-19 12:51:34 (GMT)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>2003-02-19 12:51:34 (GMT)
commit7970d20792eb4614a1dd6bd57dc5d9c107f28f35 (patch)
tree52d8910a8b2328338c50fd9671c474a7c6c8be07 /Lib/tarfile.py
parent4f28c4da36968ee006b46949f96ac48eeec91273 (diff)
downloadcpython-7970d20792eb4614a1dd6bd57dc5d9c107f28f35.zip
cpython-7970d20792eb4614a1dd6bd57dc5d9c107f28f35.tar.gz
cpython-7970d20792eb4614a1dd6bd57dc5d9c107f28f35.tar.bz2
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.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r--Lib/tarfile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py
index 6a92a10..32bb87e 100644
--- a/Lib/tarfile.py
+++ b/Lib/tarfile.py
@@ -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"