You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/07/21 12:11:56 UTC
svn commit: r1612225 - /subversion/trunk/subversion/libsvn_subr/io.c
Author: stsp
Date: Mon Jul 21 10:11:56 2014
New Revision: 1612225
URL: http://svn.apache.org/r1612225
Log:
* subversion/libsvn_subr/io.c
(svn_io_open_unique_file3): On !win32, we should ignore EINCOMPLETE and
ENOTIMPL when setting permissions on the temporary file, just like
svn_io_copy_perms does. This usually means the underlying file system
doesn't support permission bits in the first place.
Found by: Nick Chadwick
Modified:
subversion/trunk/subversion/libsvn_subr/io.c
Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1612225&r1=1612224&r2=1612225&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Mon Jul 21 10:11:56 2014
@@ -5007,8 +5007,25 @@ svn_io_open_unique_file3(apr_file_t **fi
* case, but only if the umask allows it. */
if (!using_system_temp_dir)
{
+ svn_error_t *err;
+
SVN_ERR(merge_default_file_perms(tempfile, &perms, scratch_pool));
- SVN_ERR(file_perms_set2(tempfile, perms, scratch_pool));
+ err = file_perms_set2(tempfile, perms, scratch_pool);
+ if (err)
+ {
+ if (APR_STATUS_IS_INCOMPLETE(err->apr_err) ||
+ APR_STATUS_IS_ENOTIMPL(err->apr_err))
+ svn_error_clear(err);
+ else
+ {
+ const char *message;
+ message = apr_psprintf(scratch_pool,
+ _("Can't set permissions on '%s'"),
+ svn_dirent_local_style(tempname,
+ scratch_pool));
+ return svn_error_quick_wrap(err, message);
+ }
+ }
}
#endif