/*
- $Id: afpfunc_helpers.c,v 1.1.2.1 2010-02-01 10:56:08 franklahm Exp $
Copyright (c) 2010 Frank Lahm <franklahm@gmail.com>
This program is free software; you can redistribute it and/or modify
#include <atalk/directory.h>
#include <atalk/queue.h>
#include <atalk/bstrlib.h>
+#include <atalk/globals.h>
#include "file.h"
#include "filedir.h"
#include "directory.h"
#include "dircache.h"
#include "hash.h"
-#include "globals.h"
#include "afp_config.h"
#include "volume.h"
char buf[bufsize];
char *p = buf;
int len = 0;
+ int ret;
ADD(p, len , 2);
len += push_path(&p, "");
- return afp_enumerate_ext2(obj, buf, len, rbuf, &rbuflen);
+ ret = afp_enumerate_ext2(obj, buf, len, rbuf, &rbuflen);
+
+ if (ret != AFPERR_NOOBJ && ret != AFP_OK)
+ return -1;
+ return 0;
}
uint16_t openvol(AFPObj *obj, const char *name)