diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-24 19:57:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-08-24 19:57:38 (GMT) |
commit | 02a65c468589eee54e3a4e6a851303792fe9a87d (patch) | |
tree | 212539e2a36f5b4555b56fb7875d69f002e0f8c1 /tools/h5ls/h5ls.c | |
parent | 091522290308bbee5dd98af09ec11045a67e3f68 (diff) | |
download | hdf5-02a65c468589eee54e3a4e6a851303792fe9a87d.zip hdf5-02a65c468589eee54e3a4e6a851303792fe9a87d.tar.gz hdf5-02a65c468589eee54e3a4e6a851303792fe9a87d.tar.bz2 |
[svn-r19291] Description:
Avoid getting object information for soft/external links if we aren't
going to traverse across the link itself.
Tested on:
Linux/64 2.6 (chicago) w/debug & production
(h5committest coming up)
Diffstat (limited to 'tools/h5ls/h5ls.c')
-rw-r--r-- | tools/h5ls/h5ls.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index fb08ddb..5bda0b4 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1992,7 +1992,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) switch(linfo->type) { case H5L_TYPE_SOFT: - ret = H5tools_get_link_info(iter->fid, name, &lnk_info); + ret = H5tools_get_link_info(iter->fid, name, &lnk_info, follow_symlink_g); /* lnk_info.trg_path is malloced in H5tools_get_link_info() * so it will be freed via buf later */ buf = lnk_info.trg_path; @@ -2048,8 +2048,9 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) { const char *filename; const char *path; + hbool_t follow_link = follow_symlink_g || follow_elink_g; - ret = H5tools_get_link_info(iter->fid, name, &lnk_info); + ret = H5tools_get_link_info(iter->fid, name, &lnk_info, follow_link); /* lnk_info.trg_path is malloced in H5tools_get_link_info() * so it will be freed via buf later */ buf = lnk_info.trg_path; @@ -2073,7 +2074,7 @@ list_lnk(const char *name, const H5L_info_t *linfo, void *_iter) /* Recurse through the external link */ /* keep the follow_elink_g for backward compatibility with -E */ - if(follow_symlink_g || follow_elink_g) + if(follow_link) { hbool_t orig_grp_literal = grp_literal_g; HDfputc(' ', stdout); |