mirror of
https://github.com/python/cpython.git
synced 2026-01-31 11:42:19 +00:00
Reverted r65902. See http://mail.python.org/pipermail/python-checkins/2008-August/073116.html
This commit is contained in:
parent
f5150f375d
commit
4806404ecc
1 changed files with 3 additions and 7 deletions
|
|
@ -267,13 +267,9 @@ def test_statvfs_attributes(self):
|
|||
def get_file_system(path):
|
||||
root = os.path.splitdrive(os.path.abspath(path))[0] + '\\'
|
||||
import ctypes
|
||||
from ctypes.wintypes import LPCWSTR, LPWSTR, DWORD
|
||||
LPDWORD = ctypes.POINTER(DWORD)
|
||||
f = ctypes.windll.kernel32.GetVolumeInformationW
|
||||
f.argtypes = (LPCWSTR, LPWSTR, DWORD,
|
||||
LPDWORD, LPDWORD, LPDWORD, LPWSTR, DWORD)
|
||||
buf = ctypes.create_unicode_buffer("", 100)
|
||||
if f(root, None, 0, None, None, None, buf, len(buf)):
|
||||
kernel32 = ctypes.windll.kernel32
|
||||
buf = ctypes.create_string_buffer("", 100)
|
||||
if kernel32.GetVolumeInformationA(root, None, 0, None, None, None, buf, len(buf)):
|
||||
return buf.value
|
||||
|
||||
if get_file_system(test_support.TESTFN) == "NTFS":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue