#include <atalk/bstrlib.h>
#include <atalk/bstradd.h>
#include <atalk/globals.h>
+#include <atalk/netatalk_conf.h>
#include "desktop.h"
#include "directory.h"
sd.sd_last += len + 1;
s_path.m_name = NULL;
+
+ /* Convert adouble:v2 to adouble:ea on the fly */
+ (void)ad_convert(s_path.u_name, &s_path.st, vol);
+
/*
* If a fil/dir is not a dir, it's a file. This is slightly
* inaccurate, since that means /dev/null is a file, /dev/printer
return AFPERR_MISC;
}
}
- if ((ret = getdirparams(vol, dbitmap, &s_path, dir, data + header , &esz)) != AFP_OK)
+ if ((ret = getdirparams(obj, vol, dbitmap, &s_path, dir, data + header , &esz)) != AFP_OK)
return( ret );
} else {
continue;
}
/* files are added to the dircache in getfilparams() -> getmetadata() */
- if (AFP_OK != ( ret = getfilparams(vol, fbitmap, &s_path, curdir,
- data + header , &esz )) ) {
+ if (AFP_OK != ( ret = getfilparams(obj, vol, fbitmap, &s_path, curdir,
+ data + header , &esz )) ) {
return( ret );
}
}
if ( actcnt == 0 ) {
sd.sd_did = 0; /* invalidate sd struct to force re-read */
+ /*
+ * in case were converting adouble stuff:
+ * after enumerating the whole dir we should have converted everything
+ * thus the .AppleDouble dir shouls be empty thus we can no try to
+ * delete it
+ */
+ if (vol->v_adouble == AD_VERSION_EA && ! (vol->v_flags & AFPVOL_NOV2TOEACONV))
+ (void)rmdir(".AppleDouble");
+
return( AFPERR_NOOBJ );
}
sd.sd_sindex = sindex + actcnt;