+ if (lstat(bdata(oldpath), &st) == 0 && lstat(bdata(newpath), &st) != 0 && errno == ENOENT) {
+ /* There's an .AppleDB in the volume root, we move it */
+ EC_NULL_LOG( cmd = bformat("mv '%s' '%s'", bdata(oldpath), dbdir) );
+ LOG(log_debug, logtype_cnid, "set_dbdir: cmd: %s", bdata(cmd));
+ if (WEXITSTATUS(system(bdata(cmd))) != 0) {
+ LOG(log_error, logtype_cnid, "set_dbdir: moving CNID db from \"%s\" to \"%s\" failed",
+ bdata(oldpath), dbdir);
+ EC_FAIL;
+ }