/*
- * $Id: directory.c,v 1.63 2003-03-09 19:55:33 didg Exp $
+ * $Id: directory.c,v 1.64 2003-03-15 01:34:35 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
#endif
+int get_afp_errno(const int param)
+{
+ if (afp_errno != AFPERR_DID1)
+ return afp_errno;
+ return param;
+}
+
/* ------------------- */
struct dir *
dirsearch_byname( cdir, name )
/* dir is not valid anymore
we delete dir from the cache and abort.
*/
- if ( dir->d_did == DIRDID_ROOT_PARENT)
+ if ( dir->d_did == DIRDID_ROOT_PARENT) {
+ afp_errno = AFPERR_NOOBJ;
return NULL;
+ }
if (afp_errno == AFPERR_ACCESS)
return NULL;
dir_invalidate(vol, dir);
return( 0 );
}
if ( dir->d_did == DIRDID_ROOT_PARENT) {
- afp_errno = AFPERR_PARAM;
+ afp_errno = AFPERR_DID1; /* AFPERR_PARAM;*/
return( -1 );
}
ibuf += sizeof( bitmap );
if (NULL == ( path = cname( vol, dir, &ibuf )) ) {
- return afp_errno;
+ return get_afp_errno(AFPERR_NOOBJ);
}
/* FIXME access error or not a file */
}
if (NULL == ( s_path = cname( vol, dir, &ibuf )) ) {
- return afp_errno;
+ return get_afp_errno(AFPERR_PARAM);
}
/* cname was able to move curdir to it! */
if (*s_path->m_name == '\0')
}
if (NULL == ( path = cname( vol, parentdir, &ibuf )) ) {
- return afp_errno;
+ return get_afp_errno(AFPERR_PARAM);
}
if ( *path->m_name != '\0' ) {