aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-01-31 04:13:07 -0600
committerRob Landley <rob@landley.net>2013-01-31 04:13:07 -0600
commit22791083dab2de2b22154dd4e0e593ff6c48e08b (patch)
treec70bd416c9c2fe71ffae9ce9c81549fbda6ef94f /lib
parentc26ca6e71aaa70f0aedfabfa57e7c71d0d31fe92 (diff)
downloadtoybox-22791083dab2de2b22154dd4e0e593ff6c48e08b.tar.gz
Fix -in behavior: descend into existing directory without prompting, show full path in error messages, actually overwrite when answering yes to -i.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 1defe1e4..955f2426 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -975,6 +975,7 @@ int yesno(char *prompt, int def)
while (fread(&buf, 1, 1, stdin)) {
int new;
+ // The letter changes the value, the newline (or space) returns it.
if (isspace(buf)) break;
if (-1 != (new = stridx("ny", tolower(buf)))) def = new;
}