if (alarmed)
return -1;
+ /* This currently doesn't work with "." */
+ if (strcmp(path, ".") == 0) {
+ ERROR("\".\" not supported");
+ }
const char *dir = strrchr(path, '/');
if (dir == NULL)
dir = path;
struct adouble ad;
struct stat st;
- if (stat(to.p_path, &st) != 0) {
+ if (lstat(to.p_path, &st) != 0) {
badcp = rval = 1;
break;
}
ad_init(&ad, dvolume.volinfo.v_adouble, dvolume.volinfo.v_ad_options);
- if (ad_open_metadata(to.p_path, ADFLAGS_DIR, O_RDWR | O_CREAT, &ad) != 0) {
+ if (ad_open(&ad, to.p_path, ADFLAGS_HF | ADFLAGS_DIR, O_RDWR | O_CREAT, 0666) != 0) {
ERROR("Error opening adouble for: %s", to.p_path);
}
ad_setid( &ad, st.st_dev, st.st_ino, did, pdid, dvolume.db_stamp);
struct adouble ad;
struct stat st;
- if (stat(to.p_path, &st) != 0) {
+ if (lstat(to.p_path, &st) != 0) {
badcp = rval = 1;
break;
}
ad_init(&ad, dvolume.volinfo.v_adouble, dvolume.volinfo.v_ad_options);
- if (ad_open_metadata(to.p_path, 0, O_RDWR | O_CREAT, &ad) != 0) {
+ if (ad_open(&ad, to.p_path, ADFLAGS_HF, O_RDWR | O_CREAT) != 0) {
ERROR("Error opening adouble for: %s", to.p_path);
}
ad_setid( &ad, st.st_dev, st.st_ino, cnid, did, dvolume.db_stamp);