fix: did not work when called from different directory
This commit is contained in:
parent
55da4da081
commit
7d131a2cd5
1 changed files with 6 additions and 3 deletions
|
@ -326,10 +326,13 @@ object(arg)
|
||||||
pr_arg(a)
|
pr_arg(a)
|
||||||
register struct file_list *a;
|
register struct file_list *a;
|
||||||
{
|
{
|
||||||
if (strcmp(f_dir(a), ".") == 0) {
|
char *f = f_filename(a);
|
||||||
print(f_filename(a));
|
char *d = f_dir(a);
|
||||||
|
|
||||||
|
if (strcmp(d, ".") == 0 || *f == '/' || *f == '.') {
|
||||||
|
print(f);
|
||||||
}
|
}
|
||||||
else print("%s/%s", f_dir(a), f_filename(a));
|
else print("%s/%s", d, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
print_dep()
|
print_dep()
|
||||||
|
|
Loading…
Add table
Reference in a new issue