diff options
author | drh <drh@noemail.net> | 2002-02-18 12:48:45 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2002-02-18 12:48:45 +0000 |
commit | 5ae7af7cc2bea3b668daf80034b7b2d77292f8fb (patch) | |
tree | de132d71e7dc55da965169ca2295a41bd57b2737 /src | |
parent | d820cb1b75702e74790a6ac786affc22f5c043b9 (diff) | |
download | sqlite-5ae7af7cc2bea3b668daf80034b7b2d77292f8fb.tar.gz sqlite-5ae7af7cc2bea3b668daf80034b7b2d77292f8fb.zip |
Enhancement to Windows "file-exists" function by Joel Lucsy. (CVS 374)
FossilOrigin-Name: d3d59261da9bef3250e99444167ad6ef98764574
Diffstat (limited to 'src')
-rw-r--r-- | src/os.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -210,20 +210,7 @@ int sqliteOsFileExists(const char *zFilename){ return access(zFilename, 0)==0; #endif #if OS_WIN - HANDLE h; - h = CreateFile(zFilename, - GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, - NULL - ); - if( h!=INVALID_HANDLE_VALUE ){ - CloseHandle(h); - return 1; - } - return 0; + return GetFileAttributes(zFilename) != 0xffffffff; #endif } |