diff options
Diffstat (limited to 'lib/fstree/hardlink.c')
-rw-r--r-- | lib/fstree/hardlink.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/fstree/hardlink.c b/lib/fstree/hardlink.c index 8a79d46..e71670a 100644 --- a/lib/fstree/hardlink.c +++ b/lib/fstree/hardlink.c @@ -57,6 +57,11 @@ int fstree_resolve_hard_link(fstree_t *fs, tree_node_t *node) } } + if (S_ISDIR(node->mode)) { + errno = EPERM; + return -1; + } + start->mode = FSTREE_MODE_HARD_LINK_RESOLVED; start->data.target_node = node; |