aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-12-05 01:21:03 +0100
committerPetr Machata <pmachata@redhat.com>2013-03-08 22:55:27 +0100
commite7be390210e6be64d21fa0c4b71d6fcfc45f4dcf (patch)
treeeb460eac4f75cdcf70ce7d7f88f80e7472aeee0b /options.c
parent414989183b268337a4f7e329237f3c1fd726d823 (diff)
downloadltrace-e7be390210e6be64d21fa0c4b71d6fcfc45f4dcf.tar.gz
In opt_F_get_kind, allow symbolic links
lstat should see through them, but bash process substitution produces files that report themselves as symlinks even to lstat.
Diffstat (limited to 'options.c')
-rw-r--r--options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/options.c b/options.c
index f24acac..1ed8a36 100644
--- a/options.c
+++ b/options.c
@@ -498,7 +498,7 @@ opt_F_get_kind(struct opt_F_t *entry)
entry->kind = OPT_F_BROKEN;
} else if (S_ISDIR(st.st_mode)) {
entry->kind = OPT_F_DIR;
- } else if (S_ISREG(st.st_mode)) {
+ } else if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
entry->kind = OPT_F_FILE;
} else {
fprintf(stderr, "%s is neither a regular file, "