projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f28c4d
)
OS/2 has no concept of file ownership, like DOS & MS Windows version
author
Andrew MacIntyre
<andymac@bullseye.apana.org.au>
Wed, 19 Feb 2003 12:51:34 +0000
(12:51 +0000)
committer
Andrew 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
patch
|
blob
|
history
diff --git
a/Lib/tarfile.py
b/Lib/tarfile.py
index 6a92a10e5b2cbed88877bc48e0c43ce3b64eaeac..32bb87efc8635c48b4e9a0fce8a5ed890cc5aff5 100644
(file)
--- 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"