[Python-checkins] python/dist/src/Lib tarfile.py,1.2,1.3

aimacintyre@users.sourceforge.net aimacintyre@users.sourceforge.net
Wed, 19 Feb 2003 04:51:37 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12330

Modified Files:
	tarfile.py 
Log Message:
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.


Index: tarfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/tarfile.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** tarfile.py	29 Jan 2003 03:49:43 -0000	1.2
--- tarfile.py	19 Feb 2003 12:51:34 -0000	1.3
***************
*** 1506,1510 ****
                      os.lchown(targetpath, u, g)
                  else:
!                     os.chown(targetpath, u, g)
              except EnvironmentError, e:
                  raise ExtractError, "could not change owner"
--- 1506,1511 ----
                      os.lchown(targetpath, u, g)
                  else:
!                     if sys.platform != "os2emx":
!                         os.chown(targetpath, u, g)
              except EnvironmentError, e:
                  raise ExtractError, "could not change owner"