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,6 +1505,7 @@ class TarFile(object):
|
|||||||
if tarinfo.issym() and hasattr(os, "lchown"):
|
if tarinfo.issym() and hasattr(os, "lchown"):
|
||||||
os.lchown(targetpath, u, g)
|
os.lchown(targetpath, u, g)
|
||||||
else:
|
else:
|
||||||
|
if sys.platform != "os2emx":
|
||||||
os.chown(targetpath, u, g)
|
os.chown(targetpath, u, g)
|
||||||
except EnvironmentError, e:
|
except EnvironmentError, e:
|
||||||
raise ExtractError, "could not change owner"
|
raise ExtractError, "could not change owner"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user