Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3b02742f
Kaydet (Commit)
3b02742f
authored
Ara 12, 2008
tarafından
Lars Gustäbel
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #4616: TarFile.utime(): Restore directory times on Windows.
üst
4c96fa55
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
tarfile.py
Lib/tarfile.py
+0
-4
test_tarfile.py
Lib/test/test_tarfile.py
+2
-5
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/tarfile.py
Dosyayı görüntüle @
3b02742f
...
@@ -2284,10 +2284,6 @@ class TarFile(object):
...
@@ -2284,10 +2284,6 @@ class TarFile(object):
"""
"""
if
not
hasattr
(
os
,
'utime'
):
if
not
hasattr
(
os
,
'utime'
):
return
return
if
sys
.
platform
==
"win32"
and
tarinfo
.
isdir
():
# According to msdn.microsoft.com, it is an error (EACCES)
# to use utime() on directories.
return
try
:
try
:
os
.
utime
(
targetpath
,
(
tarinfo
.
mtime
,
tarinfo
.
mtime
))
os
.
utime
(
targetpath
,
(
tarinfo
.
mtime
,
tarinfo
.
mtime
))
except
EnvironmentError
,
e
:
except
EnvironmentError
,
e
:
...
...
Lib/test/test_tarfile.py
Dosyayı görüntüle @
3b02742f
...
@@ -256,16 +256,13 @@ class MiscReadTest(ReadTest):
...
@@ -256,16 +256,13 @@ class MiscReadTest(ReadTest):
def
test_extractall
(
self
):
def
test_extractall
(
self
):
# Test if extractall() correctly restores directory permissions
# Test if extractall() correctly restores directory permissions
# and times (see issue1735).
# and times (see issue1735).
if
sys
.
platform
==
"win32"
:
# Win32 has no support for utime() on directories or
# fine grained permissions.
return
tar
=
tarfile
.
open
(
tarname
,
encoding
=
"iso8859-1"
)
tar
=
tarfile
.
open
(
tarname
,
encoding
=
"iso8859-1"
)
directories
=
[
t
for
t
in
tar
if
t
.
isdir
()]
directories
=
[
t
for
t
in
tar
if
t
.
isdir
()]
tar
.
extractall
(
TEMPDIR
,
directories
)
tar
.
extractall
(
TEMPDIR
,
directories
)
for
tarinfo
in
directories
:
for
tarinfo
in
directories
:
path
=
os
.
path
.
join
(
TEMPDIR
,
tarinfo
.
name
)
path
=
os
.
path
.
join
(
TEMPDIR
,
tarinfo
.
name
)
if
sys
.
platform
!=
"win32"
:
# Win32 has no support for fine grained permissions.
self
.
assertEqual
(
tarinfo
.
mode
&
0777
,
os
.
stat
(
path
)
.
st_mode
&
0777
)
self
.
assertEqual
(
tarinfo
.
mode
&
0777
,
os
.
stat
(
path
)
.
st_mode
&
0777
)
self
.
assertEqual
(
tarinfo
.
mtime
,
os
.
path
.
getmtime
(
path
))
self
.
assertEqual
(
tarinfo
.
mtime
,
os
.
path
.
getmtime
(
path
))
tar
.
close
()
tar
.
close
()
...
...
Misc/NEWS
Dosyayı görüntüle @
3b02742f
...
@@ -74,6 +74,8 @@ Core and Builtins
...
@@ -74,6 +74,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #4616: TarFile.utime(): Restore directory times on Windows.
- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
give correct results in the case where one argument is a quiet NaN
give correct results in the case where one argument is a quiet NaN
and the other is a finite number that requires rounding.
and the other is a finite number that requires rounding.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment