[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Fixed a bunch more Win32 permission related issues

From: Jay Freeman \(saurik\) <saurik_at_saurik.com>
Date: 2002-02-14 10:29:07 CET

OK, I finally got around to wading through all of the errors outputted
from the client tests on Win32, and added the requisite
svn_io_set_file_read_write calls to make them work.

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com

* ./subversion/libsvn_wc/log.c (file_xfer_under_path): Before performing
it's destructive file operation, this function now calls
svn_io_set_file_read_write().

(log_do_committed): Before performing it's destructive file operation,
this function now calls svn_io_set_file_read_write().

* ./subversion/libsvn_wc/adm_files.c (sync_adm_file): Before performing
it's destructive file operation, this function now calls
svn_io_set_file_read_write().

* ./subversion/libsvn_subr/io.c (svn_io_remove_file): Before performing
it's destructive file operation, this function now calls
svn_io_set_file_read_write().

Index: .\subversion\libsvn_wc\log.c
===================================================================
--- .\subversion\libsvn_wc\log.c
+++ .\subversion\libsvn_wc\log.c Thu Feb 14 03:23:10 2002
@@ -103,6 +103,11 @@
                                         pool);

     case svn_wc__xfer_mv:
+ /* Remove read-only flag on destination. */
+ SVN_ERR(svn_io_set_file_read_write (full_dest_path->data,
+ TRUE,
+ pool));
+
       status = apr_file_rename (full_from_path->data,
                               full_dest_path->data, pool);
       if (status)
@@ -878,6 +883,11 @@
                   (SVN_ERR_WC_BAD_ADM_LOG, 0, err, loggy->pool,
                    "error getting file_affected_time on %s",
                    same ? prop_path->data : tmp_prop_path->data);
+
+ /* Remove read-only flag on terminated file. */
+ SVN_ERR(svn_io_set_file_read_write (prop_base_path->data,
+ TRUE,
+ loggy->pool));

               /* Make the tmp prop file the new pristine one. */
               status = apr_file_rename (tmp_prop_path->data,
Index: .\subversion\libsvn_wc\adm_files.c
===================================================================
--- .\subversion\libsvn_wc\adm_files.c
+++ .\subversion\libsvn_wc\adm_files.c Thu Feb 14 03:13:17 2002
@@ -326,6 +326,9 @@
   v_extend_with_adm_name (tmp_path, extension, 1, pool, ap);
   va_end (ap);

+ /* Remove read-only flag on destination. */
+ SVN_ERR(svn_io_set_file_read_write (path->data, TRUE, pool));
+
   /* Rename. */
   apr_err = apr_file_rename (tmp_path->data, path->data, pool);
   if (APR_STATUS_IS_SUCCESS (apr_err))
Index: .\subversion\libsvn_subr\io.c
===================================================================
--- .\subversion\libsvn_subr\io.c
+++ .\subversion\libsvn_subr\io.c Thu Feb 14 03:14:48 2002
@@ -684,7 +684,12 @@
 svn_error_t *
 svn_io_remove_file (const char *path, apr_pool_t *pool)
 {
- apr_status_t apr_err = apr_file_remove (path, pool);
+ apr_status_t apr_err;
+
+ /* Remove read-only flag on terminated file. */
+ SVN_ERR(svn_io_set_file_read_write (path, TRUE, pool));
+
+ apr_err = apr_file_remove (path, pool);

   if (! APR_STATUS_IS_SUCCESS (apr_err))
     return svn_error_createf

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:07 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.