aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2011-10-11 12:58:38 +0000
committerdrh <drh@noemail.net>2011-10-11 12:58:38 +0000
commit29c21c77af012bed32e3c68c71b813f885c4641d (patch)
treed3d62d6714ba3e71397149a98943fab48ecff2b1 /src/os_unix.c
parent946e610a8497e3868e47ad2c976913ec37fb0df6 (diff)
parent67855877ffa8a1d70ab17a65ead5dd3872e4623a (diff)
downloadsqlite-29c21c77af012bed32e3c68c71b813f885c4641d.tar.gz
sqlite-29c21c77af012bed32e3c68c71b813f885c4641d.zip
Merge all the latest trunk changes into the sessions branch - especially
the SQLITE_ENABLE_STAT3 enhancements. FossilOrigin-Name: 403431cac6b039b0693915c5422f08dc60dae230
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index d85a7949b..a23a76234 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4888,8 +4888,16 @@ static int findCreateFileMode(
** used by the test_multiplex.c module.
*/
nDb = sqlite3Strlen30(zPath) - 1;
- while( nDb>0 && zPath[nDb]!='-' ) nDb--;
- if( nDb==0 ) return SQLITE_OK;
+#ifdef SQLITE_ENABLE_8_3_NAMES
+ while( nDb>0 && zPath[nDb]!='-' && zPath[nDb]!='/' ) nDb--;
+ if( nDb==0 || zPath[nDb]=='/' ) return SQLITE_OK;
+#else
+ while( zPath[nDb]!='-' ){
+ assert( nDb>0 );
+ assert( zPath[nDb]!='\n' );
+ nDb--;
+ }
+#endif
memcpy(zDb, zPath, nDb);
zDb[nDb] = '\0';