Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

COPY: allow lowercase drive letter for destination #94

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmd/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "../config.h"

#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -658,8 +659,8 @@ int cmd_copy(char *rest)

#define dst destFile
/* If the destination specifies a drive, check that it is valid */
if (dst[0] && dst[1] == ':' && !is_valid_disk(dst[0] - 'A')) {
error_invalid_drive(dst[0] - 'A');
if (dst[0] && dst[1] == ':' && !is_valid_disk(toupper(dst[0]) - 'A')) {
error_invalid_drive(toupper(dst[0]) - 'A');
return 0;
}
#undef dst
Expand Down