Skip to content

Ticket #5167: typo fixes in src/filemanager/file.c - #5167

Merged
zyv merged 1 commit into
MidnightCommander:masterfrom
tuffnatty:filemanager-file-typos
Sep 29, 2026
Merged

zyv merged 1 commit into
MidnightCommander:masterfrom
tuffnatty:filemanager-file-typos

Conversation

@tuffnatty

Copy link
Copy Markdown
Contributor

Proposed changes

A typo fix in comment, a typo fix in printf format string

Checklist

  • I have referenced the issue(s) resolved by this PR (if any)
  • I have signed-off my contribution with git commit --amend -s
  • Lint and unit tests pass locally with my changes (make indent && make check)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@github-actions github-actions Bot added this to the Future Releases milestone Sep 27, 2026
@github-actions github-actions Bot added needs triage Needs triage by maintainers prio: medium Has the potential to affect progress labels Sep 27, 2026
Comment thread src/filemanager/file.c

if (ctx->ignore_all
|| file_error (ctx, TRUE, _ ("Destination\n%s\nmust be a directory\n%s"), dest)
|| file_error (ctx, TRUE, _ ("Destination\n%s\nmust be a directory"), dest)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inside file_error, an empty string is passed as a second format argument, but my understanding is that it is harmless to remove the format descriptor, even though it's a somewhat questionable design.

Online C Draft Standard (n1256), s. 7.19.6.1, p. 2:

The fprintf function writes output to the stream pointed to by stream, under control of the string pointed to by format that specifies how subsequent arguments are converted for output. If there are insufficient arguments for the format, the behavior is undefined. If the format is exhausted while arguments remain, the excess arguments are evaluated (as always) but are otherwise ignored. The fprintf function returns when the end of the format string is encountered.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure it's not a bug but seems to be unintentional leftover and looks misleading.

@zyv zyv added area: core Issues not related to a specific subsystem and removed needs triage Needs triage by maintainers labels Sep 28, 2026
@zyv zyv modified the milestones: Future Releases, 4.9.0 Sep 28, 2026
@zyv zyv changed the title src/filemanager/file.c: Typo fixes Ticket #5167: typo fixes in src/filemanager/file.c Sep 29, 2026
@zyv

zyv commented Sep 29, 2026

Copy link
Copy Markdown
Member

/rebase

Signed-off-by: Phil Krylov <phil@krylov.eu>
@mc-butler
mc-butler force-pushed the filemanager-file-typos branch from 5432db1 to c265222 Compare September 29, 2026 06:46
@zyv
zyv merged commit 23a260a into MidnightCommander:master Sep 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress

Development

Successfully merging this pull request may close these issues.

2 participants