You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/05/25 00:06:34 UTC

svn commit: r947829 - /subversion/trunk/subversion/libsvn_wc/workqueue.c

Author: julianfoad
Date: Mon May 24 22:06:34 2010
New Revision: 947829

URL: http://svn.apache.org/viewvc?rev=947829&view=rev
Log:
Fix an error leak introduced in r947718.

* subversion/libsvn_wc/workqueue.c
  (verify_pristine_present): If the error isn't the expected one, return it.

Modified:
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=947829&r1=947828&r2=947829&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Mon May 24 22:06:34 2010
@@ -494,26 +494,25 @@ verify_pristine_present(svn_wc__db_t *db
   err = svn_wc__text_base_path_to_read(&base_abspath, db, local_abspath,
                                        scratch_pool, scratch_pool);
   if (err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
-    {
-      svn_error_clear(err);
-      err = svn_wc__text_revert_path_to_read(&base_abspath, db, local_abspath,
-                                             scratch_pool);
-    }
+    svn_error_clear(err);
+  else
+    return err;
+
+  err = svn_wc__text_revert_path_to_read(&base_abspath, db, local_abspath,
+                                         scratch_pool);
+  if (err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
+    svn_error_clear(err);
+  else
+    return err;
 
   /* A real file must have either a regular or a revert text-base.
      If it has neither, we could be looking at the situation described
      in issue #2101, in which case all we can do is deliver the expected
      error.  */
-  if (err && err->apr_err == SVN_ERR_WC_PATH_UNEXPECTED_STATUS)
-    {
-      svn_error_clear(err);
-      return svn_error_createf(APR_ENOENT, NULL,
-                               _("Error restoring text for '%s'"),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
-    }
-
-  return SVN_NO_ERROR;
+  return svn_error_createf(APR_ENOENT, NULL,
+                           _("Error restoring text for '%s'"),
+                           svn_dirent_local_style(local_abspath,
+                                                  scratch_pool));
 }