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
f43893a8
Kaydet (Commit)
f43893a8
authored
Eki 09, 2006
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1565150: Fix subsecond processing for os.utime on Windows.
üst
e5ec613c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
test_os.py
Lib/test/test_os.py
+8
-0
NEWS
Misc/NEWS
+2
-0
posixmodule.c
Modules/posixmodule.c
+3
-3
No files found.
Lib/test/test_os.py
Dosyayı görüntüle @
f43893a8
...
...
@@ -223,6 +223,14 @@ class StatAttributeTests(unittest.TestCase):
except
TypeError
:
pass
# Restrict test to Win32, since there is no guarantee other
# systems support centiseconds
if
sys
.
platform
==
'win32'
:
def
test_1565150
(
self
):
t1
=
1159195039.25
os
.
utime
(
self
.
fname
,
(
t1
,
t1
))
self
.
assertEquals
(
os
.
stat
(
self
.
fname
)
.
st_mtime
,
t1
)
from
test
import
mapping_tests
class
EnvironTests
(
mapping_tests
.
BasicTestMappingProtocol
):
...
...
Misc/NEWS
Dosyayı görüntüle @
f43893a8
...
...
@@ -75,6 +75,8 @@ Core and builtins
Library
-------
-
Bug
#
1565150
:
Fix
subsecond
processing
for
os
.
utime
on
Windows
.
-
Support
for
MSVC
8
was
added
to
bdist_wininst
.
-
Bug
#
1446043
:
correctly
raise
a
LookupError
if
an
encoding
name
given
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
f43893a8
...
...
@@ -792,7 +792,7 @@ time_t_to_FILE_TIME(int time_in, int nsec_in, FILETIME *out_ptr)
/* XXX endianness */
__int64
out
;
out
=
time_in
+
secs_between_epochs
;
out
=
out
*
10000000
+
nsec_in
;
out
=
out
*
10000000
+
nsec_in
/
100
;
memcpy
(
out_ptr
,
&
out
,
sizeof
(
out
));
}
...
...
@@ -2501,11 +2501,11 @@ posix_utime(PyObject *self, PyObject *args)
if
(
extract_time
(
PyTuple_GET_ITEM
(
arg
,
0
),
&
atimesec
,
&
ausec
)
==
-
1
)
goto
done
;
time_t_to_FILE_TIME
(
atimesec
,
ausec
,
&
atime
);
time_t_to_FILE_TIME
(
atimesec
,
1000
*
ausec
,
&
atime
);
if
(
extract_time
(
PyTuple_GET_ITEM
(
arg
,
1
),
&
mtimesec
,
&
musec
)
==
-
1
)
goto
done
;
time_t_to_FILE_TIME
(
mtimesec
,
musec
,
&
mtime
);
time_t_to_FILE_TIME
(
mtimesec
,
1000
*
musec
,
&
mtime
);
}
if
(
!
SetFileTime
(
hFile
,
NULL
,
&
atime
,
&
mtime
))
{
/* Avoid putting the file name into the error here,
...
...
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