Closed kivikakk closed 5 years ago
@chrisd8088 Tests for all operations should now be present (would appreciate a second set of eyes confirming this though); last is to go over each operation and test them on symlinks (or make sure such a test already exists), since they special case eeeverything.
@chrisd8088 ready for review!
❗️ Rebased after the #5 merge.
I realized you might be able to get rid of the parsing of output from
stat
entirely by usingstat --printf
to control the output to be just what you need. E.g., maybebasename $(stat --printf '%n\n' target/symlink)
to get the file name alone, without a path? And I think the--printf
option should also work for filesystem stats int006
too.
Indeed, and I do use stat -c
(--format
) in a few other places; it was just handy to get a whole chunk of information at once and then compare or grep against it. I failed to realise how unreliable the output format of stat
would be.
Fixes #8.
This is still a WIP, but opening a PR because otherwise the branch can be a bit invisible.
I'll work on finishing these out today, thanks to the helpful comments in #8.