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
0192e43d
Kaydet (Commit)
0192e43d
authored
Şub 05, 2008
tarafından
Lars Gustäbel
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #2004: Use mode 0700 for temporary directories and default
permissions for missing directories. (will backport to 2.5)
üst
dc6d9e1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
tarfile.py
Lib/tarfile.py
+9
-9
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/tarfile.py
Dosyayı görüntüle @
0192e43d
...
@@ -2021,15 +2021,11 @@ class TarFile(object):
...
@@ -2021,15 +2021,11 @@ class TarFile(object):
for
tarinfo
in
members
:
for
tarinfo
in
members
:
if
tarinfo
.
isdir
():
if
tarinfo
.
isdir
():
# Extract directory with a safe mode, so that
# Extract directories with a safe mode.
# all files below can be extracted as well.
try
:
os
.
makedirs
(
os
.
path
.
join
(
path
,
tarinfo
.
name
),
0700
)
except
EnvironmentError
:
pass
directories
.
append
(
tarinfo
)
directories
.
append
(
tarinfo
)
else
:
tarinfo
=
copy
.
copy
(
tarinfo
)
self
.
extract
(
tarinfo
,
path
)
tarinfo
.
mode
=
0700
self
.
extract
(
tarinfo
,
path
)
# Reverse sort directories.
# Reverse sort directories.
directories
.
sort
(
lambda
a
,
b
:
cmp
(
a
.
name
,
b
.
name
))
directories
.
sort
(
lambda
a
,
b
:
cmp
(
a
.
name
,
b
.
name
))
...
@@ -2134,6 +2130,8 @@ class TarFile(object):
...
@@ -2134,6 +2130,8 @@ class TarFile(object):
# Create all upper directories.
# Create all upper directories.
upperdirs
=
os
.
path
.
dirname
(
targetpath
)
upperdirs
=
os
.
path
.
dirname
(
targetpath
)
if
upperdirs
and
not
os
.
path
.
exists
(
upperdirs
):
if
upperdirs
and
not
os
.
path
.
exists
(
upperdirs
):
# Create directories that are not part of the archive with
# default permissions.
os
.
makedirs
(
upperdirs
)
os
.
makedirs
(
upperdirs
)
if
tarinfo
.
islnk
()
or
tarinfo
.
issym
():
if
tarinfo
.
islnk
()
or
tarinfo
.
issym
():
...
@@ -2170,7 +2168,9 @@ class TarFile(object):
...
@@ -2170,7 +2168,9 @@ class TarFile(object):
"""Make a directory called targetpath.
"""Make a directory called targetpath.
"""
"""
try
:
try
:
os
.
mkdir
(
targetpath
)
# Use a safe mode for the directory, the real mode is set
# later in _extract_member().
os
.
mkdir
(
targetpath
,
0700
)
except
EnvironmentError
,
e
:
except
EnvironmentError
,
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
raise
...
...
Misc/NEWS
Dosyayı görüntüle @
0192e43d
...
@@ -388,6 +388,9 @@ Core and builtins
...
@@ -388,6 +388,9 @@ Core and builtins
Library
Library
-------
-------
- #2004: tarfile.py: Use mode 0700 for temporary directories and default
permissions for missing directories.
- #175006: The debugger used to skip the condition of a "
while
" statement
- #175006: The debugger used to skip the condition of a "
while
" statement
after the first iteration. Now it correctly steps on the expression, and
after the first iteration. Now it correctly steps on the expression, and
breakpoints on the "
while
" statement are honored on each loop.
breakpoints on the "
while
" statement are honored on each loop.
...
...
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