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
2ad5421d
Kaydet (Commit)
2ad5421d
authored
Agu 31, 2014
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
don't index outside of the path (closes #22312)
üst
3f48d394
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
1 deletion
+4
-1
ntpath.py
Lib/ntpath.py
+1
-1
test_ntpath.py
Lib/test/test_ntpath.py
+1
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/ntpath.py
Dosyayı görüntüle @
2ad5421d
...
@@ -113,7 +113,7 @@ def splitdrive(p):
...
@@ -113,7 +113,7 @@ def splitdrive(p):
"""
"""
if
len
(
p
)
>
1
:
if
len
(
p
)
>
1
:
normp
=
p
.
replace
(
altsep
,
sep
)
normp
=
p
.
replace
(
altsep
,
sep
)
if
(
normp
[
0
:
2
]
==
sep
*
2
)
and
(
normp
[
2
]
!=
sep
):
if
(
normp
[
0
:
2
]
==
sep
*
2
)
and
(
normp
[
2
:
3
]
!=
sep
):
# is a UNC path:
# is a UNC path:
# vvvvvvvvvvvvvvvvvvvv drive letter or UNC path
# vvvvvvvvvvvvvvvvvvvv drive letter or UNC path
# \\machine\mountpoint\directory\etc\...
# \\machine\mountpoint\directory\etc\...
...
...
Lib/test/test_ntpath.py
Dosyayı görüntüle @
2ad5421d
...
@@ -50,6 +50,7 @@ class TestNtpath(unittest.TestCase):
...
@@ -50,6 +50,7 @@ class TestNtpath(unittest.TestCase):
# Issue #19911: UNC part containing U+0130
# Issue #19911: UNC part containing U+0130
self
.
assertEqual
(
ntpath
.
splitdrive
(
u'//conky/MOUNTPOİNT/foo/bar'
),
self
.
assertEqual
(
ntpath
.
splitdrive
(
u'//conky/MOUNTPOİNT/foo/bar'
),
(
u'//conky/MOUNTPOİNT'
,
'/foo/bar'
))
(
u'//conky/MOUNTPOİNT'
,
'/foo/bar'
))
self
.
assertEqual
(
ntpath
.
splitdrive
(
"//"
),
(
""
,
"//"
))
def
test_splitunc
(
self
):
def
test_splitunc
(
self
):
tester
(
'ntpath.splitunc("c:
\\
foo
\\
bar")'
,
tester
(
'ntpath.splitunc("c:
\\
foo
\\
bar")'
,
...
...
Misc/NEWS
Dosyayı görüntüle @
2ad5421d
...
@@ -19,6 +19,8 @@ Core and Builtins
...
@@ -19,6 +19,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #22312: Fix ntpath.splitdrive IndexError.
- Issue #22216: smtplib now resets its state more completely after a quit. The
- Issue #22216: smtplib now resets its state more completely after a quit. The
most obvious consequence of the previous behavior was a STARTTLS failure
most obvious consequence of the previous behavior was a STARTTLS failure
during a connect/starttls/quit/connect/starttls sequence.
during a connect/starttls/quit/connect/starttls sequence.
...
...
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