summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/logic/tpax_archive_enqueue.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/logic/tpax_archive_enqueue.c b/src/logic/tpax_archive_enqueue.c
index 917c8ca..7d8c278 100644
--- a/src/logic/tpax_archive_enqueue.c
+++ b/src/logic/tpax_archive_enqueue.c
@@ -234,13 +234,22 @@ static int tpax_archive_add_queue_item(
cdent->fdat = fdat;
cdent->depth = depth;
cdent->flags = flags;
- cdent->srdev = srdev;
cdent->stdev = stdev;
cdent->stino = stino;
cdent->nsize = needed;
cdent->parent = parent;
cdent->prefix = prefix;
+ switch (dirent->d_type) {
+ case DT_CHR:
+ case DT_BLK:
+ cdent->srdev = srdev;
+ break;
+
+ default:
+ cdent->srdev = 0777777;
+ }
+
memset(&cdent->dirent,0,offsetof(struct dirent,d_name));
cdent->dirent.d_ino = dirent->d_ino;