From 1d4f639e0bdcf7821d12d2bc773f99537682037f Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" <31538682+ecm-pushbx@users.noreply.github.com> Date: Mon, 29 Apr 2024 14:16:48 +0200 Subject: [PATCH] COPY: allow lowercase drive letter for destination (#94) Bug apparently in 6f764c2065fa6ffc3cbeba18043d9a4d0e22a00c --- cmd/copy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/copy.c b/cmd/copy.c index 8f9f1a24..c22adffa 100644 --- a/cmd/copy.c +++ b/cmd/copy.c @@ -26,6 +26,7 @@ #include "../config.h" #include +#include #include #include #include @@ -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