summaryrefslogtreecommitdiff
path: root/src/logic/tpax_queue_vector.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-06-06 21:11:11 +0000
committermidipix <writeonce@midipix.org>2024-06-06 23:39:26 +0000
commit37f51391c8888c7f84e27ec6995fda5dd3af49c3 (patch)
treef9c296dc28aaffbb9e2df29c87e86c4b46fef4f8 /src/logic/tpax_queue_vector.c
parentb8874b3e640e74ff287b64e969ce74aece65de10 (diff)
downloadtpax-37f51391c8888c7f84e27ec6995fda5dd3af49c3.tar.bz2
tpax-37f51391c8888c7f84e27ec6995fda5dd3af49c3.tar.xz
driver: implemented and integrated the -H (follow symlink args) cmdline option.
Diffstat (limited to 'src/logic/tpax_queue_vector.c')
-rw-r--r--src/logic/tpax_queue_vector.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/logic/tpax_queue_vector.c b/src/logic/tpax_queue_vector.c
index 82930b1..cae4da0 100644
--- a/src/logic/tpax_queue_vector.c
+++ b/src/logic/tpax_queue_vector.c
@@ -38,11 +38,17 @@ tpax_hidden const char * tpax_queue_item_full_path(
ch += sprintf(ch,"%s",pdirent[0]->prefix);
for (; pdirent > dirstck; ) {
- ch += sprintf(ch,"%s/",pdirent[0]->dirent.d_name);
+ if (!(pdirent[0]->flags & TPAX_ITEM_SYMLINK))
+ ch += sprintf(ch,"%s/",pdirent[0]->dirent.d_name);
+
pdirent--;
}
- sprintf(ch,"%s",pdirent[0]->dirent.d_name);
+ if (pdirent[0]->flags & TPAX_ITEM_SYMLINK) {
+ *--ch = '\0';
+ } else {
+ sprintf(ch,"%s",pdirent[0]->dirent.d_name);
+ }
return pathbuf;
}