Skip to content

Commit

Permalink
COPY: We shouldn't error if the target argument is a bare drive
Browse files Browse the repository at this point in the history
It was previously erroring here with invalid parameter on non existent
target drive, the error should happen later as invalid drive.
  • Loading branch information
andrewbird authored and PerditionC committed Nov 6, 2022
1 parent 6f764c2 commit b6d58cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/copy.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ int cmd_copy(char *rest)
argBuffer = buf;
buf[argc] = p->fnam = q;
buf[++argc] = 0;
} else if(*s == ':') { /* Device name?? */
} else if(*s == ':' && (s - p->fnam) > 1) { /* Device name LPT1:, but not X: */
if(!isDeviceName(p->fnam)) {
error_invalid_parameter(p->fnam);
goto errRet;
Expand Down

0 comments on commit b6d58cf

Please sign in to comment.