static int addstack(char *uname, struct dir *dir, int pidx)
{
struct dsitem *ds;
- size_t l, u;
struct dsitem *tmpds = NULL;
/* check if we have some space on stack... */
isdir = S_ISDIR(path->st.st_mode);
- if (!isdir && (of = of_findname(path))) {
+ if (!isdir && (of = of_findname(vol, path))) {
adp = of->of_ad;
} else {
ad_init(&ad, vol);
}
LOG(log_debug, logtype_afpd, "catsearch: current struct dir: \"%s\"", cfrombstr(currentdir->d_fullpath));
- error = lchdir(bdata(currentdir->d_fullpath));
+ error = movecwd(vol, currentdir);
if (!error && dirpos == NULL)
dirpos = opendir(".");
if (dirpos == NULL)
- dirpos = opendir(bdata(currentdir->d_fullpath));
+ dirpos = opendir(cfrombstr(currentdir->d_fullpath));
if (error || dirpos == NULL) {
switch (errno) {
memset(&path, 0, sizeof(path));
path.u_name = entry->d_name;
- if (of_stat(&path) != 0) {
+ if (of_stat(vol, &path) != 0) {
switch (errno) {
case EACCES:
case ELOOP:
path.u_name = name;
path.m_name = utompath(vol, name, cnid, utf8_encoding(vol->v_obj));
- if (of_stat(&path) != 0) {
+ if (of_stat(vol, &path) != 0) {
switch (errno) {
case EACCES:
case ELOOP: