From 517cda383217ae4c68c5782429a5dbc4962b407a Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sun, 15 Apr 2018 10:56:35 -0700 Subject: 42636: fix GLOB_DOTS for !(RM_STAR_SILENT) Also fix paste-o in older log entry --- Src/utils.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Src/utils.c') diff --git a/Src/utils.c b/Src/utils.c index 180693d67..cb292a050 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -2775,10 +2775,11 @@ checkrmall(char *s) const int max_count = 100; if ((rmd = opendir(unmeta(s)))) { int ignoredots = !isset(GLOBDOTS); - /* ### TODO: Passing ignoredots here is wrong. See workers/41672 - aka . - */ - while (zreaddir(rmd, ignoredots)) { + char *fname; + + while (fname = zreaddir(rmd, 1)) { + if (ignoredots && *fname == '.') + continue; count++; if (count > max_count) break; -- cgit v1.2.3 From 68d9526220d77466a75928fc6a20008cf64e0590 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sun, 15 Apr 2018 11:06:43 -0700 Subject: 42650: fix 42156 for zero-sized terminals Also fix harmless no-op typo from hand-applying 42636 for previous commit. --- ChangeLog | 2 ++ Src/utils.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'Src/utils.c') diff --git a/ChangeLog b/ChangeLog index 388d052c8..a8e2f10a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2018-04-15 Barton E. Schaefer + * 42650: Src/utils.c: fix 42156 for zero-sized terminals + * 42636: Src/utils.c: fix GLOB_DOTS for !(RM_STAR_SILENT) 2018-04-13 Daniel Hahler diff --git a/Src/utils.c b/Src/utils.c index cb292a050..b41851700 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1834,8 +1834,9 @@ adjustlines(int signalled) else shttyinfo.winsize.ws_row = zterm_lines; #endif /* TIOCGWINSZ */ - if (zterm_lines < 0) { - DPUTS(signalled, "BUG: Impossible TIOCGWINSZ rows"); + if (zterm_lines <= 0) { + DPUTS(signalled && zterm_lines < 0, + "BUG: Impossible TIOCGWINSZ rows"); zterm_lines = tclines > 0 ? tclines : 24; } @@ -1858,8 +1859,9 @@ adjustcolumns(int signalled) else shttyinfo.winsize.ws_col = zterm_columns; #endif /* TIOCGWINSZ */ - if (zterm_columns < 0) { - DPUTS(signalled, "BUG: Impossible TIOCGWINSZ cols"); + if (zterm_columns <= 0) { + DPUTS(signalled && zterm_columns < 0, + "BUG: Impossible TIOCGWINSZ cols"); zterm_columns = tccolumns > 0 ? tccolumns : 80; } @@ -2777,7 +2779,7 @@ checkrmall(char *s) int ignoredots = !isset(GLOBDOTS); char *fname; - while (fname = zreaddir(rmd, 1)) { + while ((fname = zreaddir(rmd, 1))) { if (ignoredots && *fname == '.') continue; count++; -- cgit v1.2.3