File netatalk-wrong-error-message.patch of Package netatalk.34547

diff -Naur a/bin/ad/ad_util.c b/bin/ad/ad_util.c
--- a/bin/ad/ad_util.c	2016-06-06 06:21:51.000000000 -0500
+++ b/bin/ad/ad_util.c	2016-09-14 21:50:21.384180624 -0500
@@ -267,14 +267,16 @@
     cnid = htonl(2);
 
     EC_NULL(rpath = rel_path_in_vol(path, vol->vol->v_path));
-    EC_NULL(statpath = bfromcstr(vol->vol->v_path));
 
     l = bsplit(rpath, '/');
     if (l->qty == 1)
         /* only one path element, means parent dir cnid is volume root = 2 */
         goto EC_CLEANUP;
+
+    EC_NULL(statpath = bfromcstr(vol->vol->v_path));
     for (int i = 0; i < (l->qty - 1); i++) {
         *did = cnid;
+	EC_ZERO(bcatcstr(statpath, "/"));
         EC_ZERO(bconcat(statpath, l->entry[i]));
         EC_ZERO_LOGSTR(lstat(cfrombstr(statpath), &st),
                        "lstat(rpath: %s, elem: %s): %s: %s",
@@ -289,7 +291,6 @@
                              0)) == CNID_INVALID) {
             EC_FAIL;
         }
-        EC_ZERO(bcatcstr(statpath, "/"));
     }
 
 EC_CLEANUP:
openSUSE Build Service is sponsored by