Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Modify the VFS xAccess() method on winNT so that it returns false for an exists test of a zero-length file. This makes the windows VFS work the same as the unix VFS. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
ec35f25403744f7441ac5ae1486b84d8 |
User & Date: | drh 2010-07-05 21:00:43.000 |
Context
2010-07-06
| ||
07:36 | Ensure the correct error code is returned if an attempt to parse a database schema made by an ATTACH statement fails. (check-in: c272196115 user: dan tags: trunk) | |
2010-07-05
| ||
21:00 | Modify the VFS xAccess() method on winNT so that it returns false for an exists test of a zero-length file. This makes the windows VFS work the same as the unix VFS. (check-in: ec35f25403 user: drh tags: trunk) | |
19:13 | Simplify the previous commit by removing the pagerCheckForOrDeleteWAL() wrapper. (check-in: a1324d125e user: dan tags: trunk) | |
Changes
Changes to src/os_win.c.
︙ | ︙ | |||
2074 2075 2076 2077 2078 2079 2080 | int rc = 0; void *zConverted = convertUtf8Filename(zFilename); UNUSED_PARAMETER(pVfs); if( zConverted==0 ){ return SQLITE_NOMEM; } if( isNT() ){ | > > | > > > > > > > > | 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 | int rc = 0; void *zConverted = convertUtf8Filename(zFilename); UNUSED_PARAMETER(pVfs); if( zConverted==0 ){ return SQLITE_NOMEM; } if( isNT() ){ WIN32_FILE_ATTRIBUTE_DATA sAttrData; memset(&sAttrData, 0, sizeof(sAttrData)); attr = GetFileAttributesExW((WCHAR*)zConverted, GetFileExInfoStandard, &sAttrData); /* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file ** as if it does not exist. */ if( flags==SQLITE_ACCESS_EXISTS && attr!=INVALID_FILE_ATTRIBUTES && sAttrData.nFileSizeHigh==0 && sAttrData.nFileSizeLow==0 ){ attr = INVALID_FILE_ATTRIBUTES; } /* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. ** Since the ASCII version of these Windows API do not exist for WINCE, ** it's important to not reference them for WINCE builds. */ #if SQLITE_OS_WINCE==0 }else{ attr = GetFileAttributesA((char*)zConverted); |
︙ | ︙ |