Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: third_party/sqlite/src/src/test_demovfs.c

Issue 901033002: Import SQLite 3.8.7.4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chromium changes to support SQLite 3.8.7.4. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/sqlite/src/src/test_demovfs.c
diff --git a/third_party/sqlite/src/src/test_demovfs.c b/third_party/sqlite/src/src/test_demovfs.c
index e56e8065cfbcd3cb73cfbf5d3535265b130998e8..c63b0a8b7a19bc398e1edb5d523757f2a0973e88 100644
--- a/third_party/sqlite/src/src/test_demovfs.c
+++ b/third_party/sqlite/src/src/test_demovfs.c
@@ -10,14 +10,12 @@
**
*************************************************************************
**
-** An example of a simple VFS implementation that omits complex features
-** often not required or not possible on embedded platforms. Also includes
-** code to buffer writes to the journal file, which can be a significant
-** performance improvement on some embedded platforms.
+** This file implements an example of a simple VFS implementation that
+** omits complex features often not required or not possible on embedded
+** platforms. Code is included to buffer writes to the journal file,
+** which can be a significant performance improvement on some embedded
+** platforms.
**
-*/
-
-/*
** OVERVIEW
**
** The code in this file implements a minimal SQLite VFS that can be
@@ -128,6 +126,7 @@
#include <unistd.h>
#include <time.h>
#include <errno.h>
+#include <fcntl.h>
/*
** Size of the write buffer used by journal files in bytes.
@@ -537,7 +536,7 @@ static int demoFullPathname(
if( zPath[0]=='/' ){
zDir[0] = '\0';
}else{
- getcwd(zDir, sizeof(zDir));
+ if( getcwd(zDir, sizeof(zDir))==0 ) return SQLITE_IOERR;
}
zDir[MAXPATHNAME] = '\0';

Powered by Google App Engine
This is Rietveld 408576698