mirror of
https://github.com/gryf/pygtktalog.git
synced 2025-12-17 19:40:21 +01:00
* Change of direcotry attributes in tar extracting function for
Python 2.4.
This commit is contained in:
@@ -401,7 +401,7 @@ class MainModel(ModelMT):
|
|||||||
# Extract directory with a safe mode, so that
|
# Extract directory with a safe mode, so that
|
||||||
# all files below can be extracted as well.
|
# all files below can be extracted as well.
|
||||||
try:
|
try:
|
||||||
os.makedirs(os.path.join('.', tarinfo.name), 0777)
|
os.makedirs(os.path.join('.', tarinfo.name), 0700)
|
||||||
except EnvironmentError:
|
except EnvironmentError:
|
||||||
pass
|
pass
|
||||||
directories.append(tarinfo)
|
directories.append(tarinfo)
|
||||||
@@ -415,9 +415,8 @@ class MainModel(ModelMT):
|
|||||||
# Set correct owner, mtime and filemode on directories.
|
# Set correct owner, mtime and filemode on directories.
|
||||||
for tarinfo in directories:
|
for tarinfo in directories:
|
||||||
try:
|
try:
|
||||||
os.chown(tarinfo, '.')
|
os.chown(os.path.join('.', tarinfo.name), t.uid)
|
||||||
os.utime(tarinfo, '.')
|
os.utime(os.path.join('.', tarinfo.name), (0, t.mtime))
|
||||||
os.chmod(tarinfo, '.')
|
|
||||||
except OSError:
|
except OSError:
|
||||||
if __debug__:
|
if __debug__:
|
||||||
print "m_main.py: open(): setting corrext owner,",
|
print "m_main.py: open(): setting corrext owner,",
|
||||||
|
|||||||
Reference in New Issue
Block a user