diff options
author | Ben S <ogham@bsago.me> | 2016-10-29 20:27:23 +0100 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2016-10-29 20:27:23 +0100 |
commit | 74358c188a34f696c0e5fcf794cbab9417e67cda (patch) | |
tree | 7c25b58adba6fb217364b4cb08327b595b855bd6 /src/options/view.rs | |
parent | ba366fc855fa09776336f85c0c6d82faa1dc171d (diff) |
Properly handle errors when following a symlink
Fixes #123. The code assumes that every File that has its link_target() method called would first have been checked to make sure it’s actually a link first. Unfortunately it also assumed that the only thing that can go wrong while following a link is if the file wasn’t a link, meaning it crashes when given a link it doesn’t have permission to follow.
This makes the file_target() method able to return either a file or path for displaying, as before, but also an IO error for when things go wrong.
Diffstat (limited to 'src/options/view.rs')
0 files changed, 0 insertions, 0 deletions