mirror of
https://github.com/sqlite/sqlite.git
synced 2025-10-27 08:52:26 +03:00
Ensure master journal file is deleted when a transaction is committed. (CVS 1586)
FossilOrigin-Name: cb3cbe00be9a42e974688016a056053cedb55eef
This commit is contained in:
@@ -620,6 +620,22 @@ int sqlite3OsSync(OsFile *id){
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Sync the directory zDirname. This is a no-op on operating systems other
|
||||
** than UNIX.
|
||||
*/
|
||||
int sqlite3OsSyncDirectory(const char *zDirname){
|
||||
int fd;
|
||||
int r;
|
||||
fd = open(zDirname, O_RDONLY|O_BINARY, 0644);
|
||||
if( fd<0 ){
|
||||
return SQLITE_CANTOPEN;
|
||||
}
|
||||
r = fsync(fd);
|
||||
close(fd);
|
||||
return ((r==0)?SQLITE_OK:SQLITE_IOERR);
|
||||
}
|
||||
|
||||
/*
|
||||
** Truncate an open file to a specified size
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user