File netatalk-wrong-error-message.patch of Package netatalk.30708
Index: bin/ad/ad_util.c
===================================================================
--- bin/ad/ad_util.c.orig 2013-10-28 16:46:51.000000000 +0100
+++ bin/ad/ad_util.c 2013-11-18 13:05:06.718947414 +0100
@@ -271,14 +271,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",
@@ -293,7 +295,6 @@
0)) == CNID_INVALID) {
EC_FAIL;
}
- EC_ZERO(bcatcstr(statpath, "/"));
}
EC_CLEANUP: