mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Allow database files to be created in the root directory on unix.
Ticket #3570. (CVS 6141) FossilOrigin-Name: 81014334ad57e380e21c47ad6eebe9f16b4ad24c
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
** * Definitions of sqlite3_vfs objects for all locking methods
|
||||
** plus implementations of sqlite3_os_init() and sqlite3_os_end().
|
||||
**
|
||||
** $Id: os_unix.c,v 1.233 2008/12/22 03:37:00 danielk1977 Exp $
|
||||
** $Id: os_unix.c,v 1.234 2009/01/08 14:36:20 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#if SQLITE_OS_UNIX /* This file is used on unix only */
|
||||
@@ -3375,7 +3375,7 @@ static int openDirectory(const char *zFilename, int *pFd){
|
||||
char zDirname[MAX_PATHNAME+1];
|
||||
|
||||
sqlite3_snprintf(MAX_PATHNAME, zDirname, "%s", zFilename);
|
||||
for(ii=(int)strlen(zDirname); ii>=0 && zDirname[ii]!='/'; ii--);
|
||||
for(ii=(int)strlen(zDirname); ii>1 && zDirname[ii]!='/'; ii--);
|
||||
if( ii>0 ){
|
||||
zDirname[ii] = '\0';
|
||||
fd = open(zDirname, O_RDONLY|O_BINARY, 0);
|
||||
|
||||
Reference in New Issue
Block a user