SHA256
1
0
forked from pool/sqlite3
sqlite3/fix_dir_exists_on_btrfs.patch

13 lines
412 B
Diff
Raw Normal View History

--- src/os_unix.c_orig 2019-12-26 00:56:55.810897741 +0100
+++ src/os_unix.c 2019-12-26 00:59:29.904449135 +0100
@@ -6259,7 +6259,8 @@
if( flags==SQLITE_ACCESS_EXISTS ){
struct stat buf;
- *pResOut = (0==osStat(zPath, &buf) && buf.st_size>0);
+ *pResOut = (0==osStat(zPath, &buf) &&
+ ((buf.st_size>0) || S_ISDIR(buf.st_mode)));
}else{
*pResOut = osAccess(zPath, W_OK|R_OK)==0;
}