char *dp = NULL;
for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap; ap++)
- if ((i = alias(*ap)) != AK_OK)
+ if ((i = alias(etcpath(*ap))) != AK_OK)
adios(NULL, "aliasing error in %s - %s", *ap, akerror(i));
if (dp)
free(dp);
}
+/*
+** file needs to be absolute or relative to cwd
+*/
int
alias(char *file)
{
register struct aka *ak = NULL;
register FILE *fp;
- if (*file!='/' && (strncmp(file, "./", 2)!=0 &&
- strncmp(file, "../", 3)!=0))
- file = etcpath(file);
if ((fp = fopen(file, "r")) == NULL) {
akerrst = file;
return AK_NOFILE;
for (ap = brkstring(dp = getcpy(cp), " ", "\n"); ap && *ap;
ap++) {
vec[vecp++] = "-alias";
- vec[vecp++] = *ap;
+ vec[vecp++] = getcpy(etcpath(*ap));
}
}
dp = getcpy(cp);
for (ap = brkstring(dp, " ", "\n"); ap && *ap; ap++) {
vec[vecp++] = "-alias";
- vec[vecp++] = *ap;
+ vec[vecp++] = getcpy(etcpath(*ap));
}
}