Author: kotkov
Date: Thu Feb 27 23:27:06 2025
New Revision: 1924086

URL: http://svn.apache.org/viewvc?rev=1924086&view=rev
Log:
* subversion/libsvn_wc/wc_db_pristine.c
  (install_stream_seek_fn): Use explicit if-else blocks for clarity and
   consistency with other stream seek handlers that only support reset.
   This should help prevent issues like the one fixed in r1924085.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c?rev=1924086&r1=1924085&r2=1924086&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_pristine.c Thu Feb 27 23:27:06 
2025
@@ -286,13 +286,18 @@ install_stream_seek_fn(void *baton, cons
 {
   svn_wc__db_install_data_t *install_data = baton;
 
+  /* Only reset support. */
   if (mark)
-    return svn_error_create(SVN_ERR_STREAM_SEEK_NOT_SUPPORTED, NULL, NULL);
+    {
+      return svn_error_create(SVN_ERR_STREAM_SEEK_NOT_SUPPORTED, NULL, NULL);
+    }
+  else
+    {
+      if (install_data->inner_stream)
+        SVN_ERR(svn_stream_reset(install_data->inner_stream));
 
-  if (install_data->inner_stream)
-    SVN_ERR(svn_stream_reset(install_data->inner_stream));
-
-  install_data->size = 0;
+      install_data->size = 0;
+    }
 
   return SVN_NO_ERROR;
 }


Reply via email to