1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-12 13:01:09 +03:00

Ignore the value of SQLITE_FCNTL_CHUNK_SIZE if it is negative.

FossilOrigin-Name: 1b08fef9451f4d59148548faed115d1a5d0bcd98
This commit is contained in:
drh
2012-04-05 20:04:39 +00:00
parent 3343b43915
commit b8af4b7919
3 changed files with 8 additions and 8 deletions

View File

@@ -3421,7 +3421,7 @@ static int unixTruncate(sqlite3_file *id, i64 nByte){
** actual file size after the operation may be larger than the requested
** size).
*/
if( pFile->szChunk ){
if( pFile->szChunk>0 ){
nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
}