Index: SVN/SVNPatch.cpp
===================================================================
--- SVN/SVNPatch.cpp	(revision 19647)
+++ SVN/SVNPatch.cpp	(working copy)
@@ -420,11 +420,29 @@
 {
     CString msg;
     CString temp;
-    char errbuf[256];
 
     if (Err != NULL)
     {
         svn_error_t * ErrPtr = Err;
+        msg = GetErrorMessageForNode(ErrPtr);
+        while (ErrPtr->child)
+        {
+            ErrPtr = ErrPtr->child;
+            msg += _T("\n");
+            temp = GetErrorMessageForNode(ErrPtr);
+            msg += temp;
+        }
+    }
+    return msg;
+}
+
+CString	 SVNPatch::GetErrorMessageForNode(svn_error_t* Err) const
+{
+    CString msg;
+    char errbuf[256];
+    if (Err != NULL)
+    {
+        svn_error_t * ErrPtr = Err;
         if (ErrPtr->message)
             msg = CUnicodeUtils::GetUnicode(ErrPtr->message);
         else
@@ -432,7 +450,9 @@
             /* Is this a Subversion-specific error code? */
             if ((ErrPtr->apr_err > APR_OS_START_USEERR)
                 && (ErrPtr->apr_err <= APR_OS_START_CANONERR))
+            {
                 msg = svn_strerror (ErrPtr->apr_err, errbuf, sizeof (errbuf));
+            }
             /* Otherwise, this must be an APR error code. */
             else
             {
@@ -451,41 +471,6 @@
             }
         }
         msg = CStringUtils::LinesWrap(msg, 80);
-        while (ErrPtr->child)
-        {
-            ErrPtr = ErrPtr->child;
-            msg += _T("\n");
-            if (ErrPtr->message)
-                temp = CUnicodeUtils::GetUnicode(ErrPtr->message);
-            else
-            {
-                /* Is this a Subversion-specific error code? */
-                if ((ErrPtr->apr_err > APR_OS_START_USEERR)
-                    && (ErrPtr->apr_err <= APR_OS_START_CANONERR))
-                    temp = svn_strerror (ErrPtr->apr_err, errbuf, sizeof (errbuf));
-                /* Otherwise, this must be an APR error code. */
-                else
-                {
-                    svn_error_t *temp_err = NULL;
-                    const char * err_string = NULL;
-                    temp_err = svn_utf_cstring_to_utf8(&err_string, apr_strerror (ErrPtr->apr_err, errbuf, sizeof (errbuf)-1), ErrPtr->pool);
-                    if (temp_err)
-                    {
-                        svn_error_clear (temp_err);
-                        temp = _T("Can't recode error string from APR");
-                    }
-                    else
-                    {
-                        temp = CUnicodeUtils::GetUnicode(err_string);
-                    }
-                }
-            }
-            temp = CStringUtils::LinesWrap(temp, 80);
-            msg += temp;
-        }
-        return msg;
     }
-    return _T("");
+    return msg;
 }
-
-
Index: SVN/SVNPatch.h
===================================================================
--- SVN/SVNPatch.h	(revision 19647)
+++ SVN/SVNPatch.h	(working copy)
@@ -89,6 +89,7 @@
      */
     CString                 Strip(const CString& filename) const;
     CString                 GetErrorMessage(svn_error_t * Err) const;
+    CString                 GetErrorMessageForNode(svn_error_t* Err) const;
 
     static int              abort_on_pool_failure (int retcode);
     static svn_error_t *    patch_func( void *baton, svn_boolean_t * filtered, const char * canon_path_from_patchfile, 
Index: TortoiseShell/ShellCache.cpp
===================================================================
--- TortoiseShell/ShellCache.cpp	(revision 19647)
+++ TortoiseShell/ShellCache.cpp	(working copy)
@@ -572,9 +572,11 @@
 
                 if (source->included == svn_tristate_true)
                     dest->included = svn_tristate_true;
-                if (   source->recursive 
+                if (source->recursive 
                     && source->subPathIncluded == svn_tristate_true)
+                {
                     dest->subPathIncluded = svn_tristate_true;
+                }
             }
         }
         else
@@ -715,8 +717,7 @@
 
 svn_tristate_t ShellCache::CPathFilter::IsPathAllowed (LPCTSTR path) const
 {
-    return path != NULL
-        ? IsPathAllowed (path, data.begin(), data.end())
-        : svn_tristate_unknown;
+    if (path == NULL)
+        return svn_tristate_unknown;
+    return IsPathAllowed (path, data.begin(), data.end());
 }
-
