aboutsummaryrefslogtreecommitdiff
path: root/bb.c
diff options
context:
space:
mode:
Diffstat (limited to 'bb.c')
-rw-r--r--bb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bb.c b/bb.c
index 233c998..0d13f3f 100644
--- a/bb.c
+++ b/bb.c
@@ -752,7 +752,9 @@ entry_t* load_entry(bb_t *bb, const char *path)
// Check for pre-existing:
for (entry_t *e = bb->hash[(int)filestat.st_ino & HASH_MASK]; e; e = e->hash.next) {
- if (e->info.st_ino == filestat.st_ino && e->info.st_dev == filestat.st_dev)
+ if (e->info.st_ino == filestat.st_ino && e->info.st_dev == filestat.st_dev
+ // Need to check filename in case of hard links
+ && strcmp(pbuf, e->fullname) == 0)
return e;
}