]> arthur.barton.de Git - netatalk.git/commitdiff
Use ad_getid() instead of ad_forcegetid()
authorRalph Boehme <sloowfranklin@gmail.com>
Mon, 10 Dec 2012 14:04:24 +0000 (15:04 +0100)
committerRalph Boehme <sloowfranklin@gmail.com>
Mon, 17 Dec 2012 17:22:58 +0000 (18:22 +0100)
ad_getid() now ignores the db stamp when reading the CNID, so we
can simply use it instead of using ad_forcegetid().

etc/cnid_dbd/cmd_dbd_scanvol.c

index 37012f27d4b06cecc058ba8dae5549d7c313dd7d..68300b6c464f3cac00eb5826740a5de4acfc69ae 100644 (file)
@@ -628,15 +628,8 @@ static cnid_t check_cnid(const char *name, cnid_t did, struct stat *st, int adfi
             dbd_log( LOGDEBUG, "File without meta EA: \"%s/%s\"", cwdbuf, name);
             adfile_ok = 1;
         } else {
-            if (dbd_flags & DBD_FLAGS_FORCE) {
-                ad_cnid = ad_forcegetid(&ad);
-                /* This ensures the changed stamp is written */
-                ad_setid( &ad, st->st_dev, st->st_ino, ad_cnid, did, stamp);
-                ad_flush(&ad);
-            } else
-                ad_cnid = ad_getid(&ad, st->st_dev, st->st_ino, 0, stamp);
-
-            if (ad_cnid == 0)
+            ad_cnid = ad_getid(&ad, st->st_dev, st->st_ino, 0, stamp);
+            if (ad_cnid == CNID_INVALID)
                 dbd_log( LOGSTD, "Bad CNID in adouble file of '%s/%s'", cwdbuf, name);
             else
                 dbd_log( LOGDEBUG, "CNID from .AppleDouble file for '%s/%s': %u", cwdbuf, name, ntohl(ad_cnid));