Skip to content

Commit

Permalink
COPY: allow lowercase drive letter for destination (#94)
Browse files Browse the repository at this point in the history
Bug apparently in 6f764c2
  • Loading branch information
ecm-pushbx authored Apr 29, 2024
1 parent d0798ad commit 1d4f639
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 1d4f639

Please sign in to comment.