summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3113582)
The error behaviour of hivex_node_get_child is subtle, so the 'cd'
command wouldn't always report errors correctly. This fixes it.
new_cwd = hivex_node_get_child (h, new_cwd, elem);
if (new_cwd == 0) {
new_cwd = hivex_node_get_child (h, new_cwd, elem);
if (new_cwd == 0) {
- fprintf (stderr, _("hivexsh: cd: subkey '%s' not found\n"),
- elem);
+ if (errno)
+ perror ("hivexsh: cd");
+ else
+ fprintf (stderr, _("hivexsh: cd: subkey '%s' not found\n"),
+ elem);