/*
- * $Id: filedir.c,v 1.40 2003-01-24 07:08:43 didg Exp $
+ * $Id: filedir.c,v 1.41 2003-02-16 12:35:04 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* this is a directory */
*(rbuf + 2 * sizeof( u_int16_t )) = (char) FILDIRBIT_ISDIR;
} else {
- if (fbitmap && ( ret = getfilparams(vol, fbitmap, s_path, curdir,
- rbuf + 3 * sizeof( u_int16_t ), &buflen )) != AFP_OK ) {
+ if (fbitmap && AFP_OK != (ret = getfilparams(vol, fbitmap, s_path, curdir,
+ rbuf + 3 * sizeof( u_int16_t ), &buflen )) ) {
return( ret );
}
/* this is a file */
memcpy( &did, ibuf, sizeof( did));
ibuf += sizeof( did);
- if (( dir = dirlookup( vol, did )) == NULL ) {
+ if (NULL == ( dir = dirlookup( vol, did )) ) {
return afp_errno;
}
bitmap = ntohs( bitmap );
ibuf += sizeof( bitmap );
- if (( path = cname( vol, dir, &ibuf )) == NULL ) {
+ if (NULL == ( path = cname( vol, dir, &ibuf ))) {
return afp_errno;
}
}
/* source pathname */
- if (( path = cname( vol, sdir, &ibuf )) == NULL ) {
+ if (NULL == ( path = cname( vol, sdir, &ibuf )) ) {
return afp_errno;
}
}
} else if (of_findname(s_path)) {
rc = AFPERR_BUSY;
- } else if (AFP_OK == (rc = deletefile( upath, 1))) {
-#ifdef CNID_DB /* get rid of entry */
- cnid_t id = cnid_get(vol->v_db, curdir->d_did, upath, strlen(upath));
- cnid_delete(vol->v_db, id);
-#endif /* CNID_DB */
+ } else {
+ rc = deletefile(vol, upath, 1);
}
if ( rc == AFP_OK ) {
curdir->offcnt--;