]> granicus.if.org Git - python/commitdiff
OS/2 has no concept of file ownership, like DOS & MS Windows version
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Wed, 19 Feb 2003 12:51:34 +0000 (12:51 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Wed, 19 Feb 2003 12:51:34 +0000 (12:51 +0000)
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.

Lib/tarfile.py

index 6a92a10e5b2cbed88877bc48e0c43ce3b64eaeac..32bb87efc8635c48b4e9a0fce8a5ed890cc5aff5 100644 (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"