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
3df7b5a5
Kaydet (Commit)
3df7b5a5
authored
Agu 26, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't do truncation to 8+3 format -- this is used on NT file systems!
üst
c75db0b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
ntpath.py
Lib/ntpath.py
+2
-9
No files found.
Lib/ntpath.py
Dosyayı görüntüle @
3df7b5a5
...
...
@@ -312,7 +312,8 @@ def expandvars(path):
# Normalize a path, e.g. A//B, A/./B and A/foo/../B all become A/B.
# Also, components of the path are silently truncated to 8+3 notation.
# Previously, this function also truncated pathnames to 8+3 format,
# but as this module is called "ntpath", that's obviously wrong!
def
normpath
(
path
):
path
=
normcase
(
path
)
...
...
@@ -331,17 +332,9 @@ def normpath(path):
i
=
i
-
1
elif
comps
[
i
]
==
''
and
i
>
0
and
comps
[
i
-
1
]
<>
''
:
del
comps
[
i
]
elif
'.'
in
comps
[
i
]:
comp
=
string
.
splitfields
(
comps
[
i
],
'.'
)
comps
[
i
]
=
comp
[
0
][:
8
]
+
'.'
+
comp
[
1
][:
3
]
i
=
i
+
1
elif
len
(
comps
[
i
])
>
8
:
comps
[
i
]
=
comps
[
i
][:
8
]
i
=
i
+
1
else
:
i
=
i
+
1
# If the path is now empty, substitute '.'
if
not
prefix
and
not
comps
:
comps
.
append
(
'.'
)
return
prefix
+
string
.
joinfields
(
comps
,
os
.
sep
)
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