Author: philip
Date: Thu Dec 5 15:30:33 2013
New Revision: 1548165
URL: http://svn.apache.org/r1548165
Log:
* subversion/libsvn_subr/sqlite.c
(internal_open): Allow for multiple threads attempting to create the file.
Modified:
subversion/trunk/subversion/libsvn_subr/sqlite.c
Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=1548165&r1=1548164&r2=1548165&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Thu Dec 5 15:30:33 2013
@@ -819,7 +819,13 @@ internal_open(sqlite3 **db3, const char
We simply want umask permissions. */
SVN_ERR(svn_io_check_path(path, &kind, scratch_pool));
if (kind == svn_node_none)
- SVN_ERR(svn_io_file_create_empty(path, scratch_pool));
+ {
+ /* Another thread may have created the file, that's OK. */
+ svn_error_t *err = svn_io_file_create_empty(path, scratch_pool);
+ if (err && !APR_STATUS_IS_EEXIST(err->apr_err))
+ return svn_error_trace(err);
+ svn_error_clear(err);
+ }
}
#endif