Index: subversion/libsvn_wc/workqueue.c =================================================================== --- subversion/libsvn_wc/workqueue.c (revision 1577065) +++ subversion/libsvn_wc/workqueue.c (working copy) @@ -476,6 +476,7 @@ const svn_checksum_t *checksum; apr_hash_t *props; apr_time_t changed_date; + svn_error_t *err; local_relpath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len); SVN_ERR(svn_wc__db_from_relpath(&local_abspath, db, wri_abspath, @@ -564,17 +565,32 @@ scratch_pool); } + temp_dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool); +#if 0 /* Where is the Right Place to put a temp file in this working copy? */ SVN_ERR(svn_wc__db_temp_wcroot_tempdir(&temp_dir_abspath, db, wcroot_abspath, scratch_pool, scratch_pool)); +#endif /* Translate to a temporary file. We don't want the user seeing a partial file, nor let them muck with it while we translate. We may also need to get its TRANSLATED_SIZE before the user can monkey it. */ - SVN_ERR(svn_stream__create_for_install(&dst_stream, temp_dir_abspath, - scratch_pool, scratch_pool)); + err = svn_stream__create_for_install(&dst_stream, temp_dir_abspath, + scratch_pool, scratch_pool); + if (err && APR_STATUS_IS_ENOENT(err->apr_err)) + { + svn_error_clear(err); + SVN_ERR(svn_io_make_dir_recursively(temp_dir_abspath, scratch_pool)); + SVN_ERR(svn_stream__create_for_install(&dst_stream, temp_dir_abspath, + scratch_pool, scratch_pool)); + } + else if (err) + { + return svn_error_trace(err); + } + /* Copy from the source to the dest, translating as we go. This will also close both streams. */ SVN_ERR(svn_stream_copy3(src_stream, dst_stream,