Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Minimize the requested permissions when opening the volume on Windows 7 and Vista. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | winSectorSize |
Files: | files | file ages | folders |
SHA1: |
8d429a59cdad1693827b41369d642f94 |
User & Date: | mistachkin 2017-01-18 19:06:41.323 |
Context
2017-01-18
| ||
19:36 | Improve and update comments. (check-in: 2dc16d345b user: mistachkin tags: winSectorSize) | |
19:06 | Minimize the requested permissions when opening the volume on Windows 7 and Vista. (check-in: 8d429a59cd user: mistachkin tags: winSectorSize) | |
01:11 | Add runtime version checking for winSectorSize. (check-in: cb9d1ab33d user: mistachkin tags: winSectorSize) | |
Changes
Changes to src/os_win.c.
︙ | ︙ | |||
3697 3698 3699 3700 3701 3702 3703 | if( winIsDriveLetterAndColon(pFile->zPath) && winIsOnSameVolume(pFile) ){ WCHAR zDisk[] = L"\\\\.\\_:\0"; /* underscore will be drive letter */ HANDLE hDisk; zDisk[4] = (WCHAR)pFile->zPath[0]; /* 'A' to 'Z' only, upper/lower case */ assert( (zDisk[4]>=L'A' && zDisk[4]<=L'Z') || (zDisk[4]>=L'a' && zDisk[4]<=L'z') ); | < | | 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 | if( winIsDriveLetterAndColon(pFile->zPath) && winIsOnSameVolume(pFile) ){ WCHAR zDisk[] = L"\\\\.\\_:\0"; /* underscore will be drive letter */ HANDLE hDisk; zDisk[4] = (WCHAR)pFile->zPath[0]; /* 'A' to 'Z' only, upper/lower case */ assert( (zDisk[4]>=L'A' && zDisk[4]<=L'Z') || (zDisk[4]>=L'a' && zDisk[4]<=L'z') ); hDisk = osCreateFileW(zDisk, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if( hDisk!=NULL ){ STORAGE_PROPERTY_QUERY query; STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR alignment; DWORD bytes = 0; memset(&query, 0, sizeof(STORAGE_PROPERTY_QUERY)); memset(&alignment, 0, sizeof(STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR)); |
︙ | ︙ |