From: didg Date: Sat, 28 Nov 2009 15:42:05 +0000 (+0000) Subject: don't trash the db if a file is moved to a different directory without updating the db X-Git-Tag: branch-symlink-start~61 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=eca21be7bec8e452715506d77a32b1cb48697191 don't trash the db if a file is moved to a different directory without updating the db --- diff --git a/etc/cnid_dbd/dbd_lookup.c b/etc/cnid_dbd/dbd_lookup.c index bacaed63..f680d2f0 100644 --- a/etc/cnid_dbd/dbd_lookup.c +++ b/etc/cnid_dbd/dbd_lookup.c @@ -1,5 +1,5 @@ /* - * $Id: dbd_lookup.c,v 1.12 2009-11-27 15:45:41 franklahm Exp $ + * $Id: dbd_lookup.c,v 1.13 2009-11-28 15:42:05 didg Exp $ * * Copyright (C) Joerg Lenneis 2003 * Copyright (C) Frank Lahm 2009 @@ -242,6 +242,7 @@ int dbd_lookup(DBD *dbd, struct cnid_dbd_rqst *rqst, struct cnid_dbd_rply *rply, ntohl(rqst->did), rqst->name, (unsigned long long)rqst->dev, (unsigned long long)rqst->ino); /* Case 2) ? */ if (strcmp(rqst->name, (char *)devdata.data + CNID_NAME_OFS) == 0) { + rqst->cnid = id_devino; LOG(log_debug, logtype_cnid, "dbd_lookup: server side mv from one dir to another"); update = 1; } else {