cmd: Fix 'copy foo bar/' which gave access denied errors.

This commit is contained in:
Eric Pouech 2006-12-26 17:51:24 +01:00 committed by Alexandre Julliard
parent bad3434330
commit b7923b4200
1 changed files with 2 additions and 0 deletions

View File

@ -126,6 +126,8 @@ char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
}
GetFullPathName (param2, sizeof(outpath), outpath, NULL);
if (outpath[strlen(outpath) - 1] == '\\')
outpath[strlen(outpath) - 1] = '\0';
hff = FindFirstFile (outpath, &fd);
if (hff != INVALID_HANDLE_VALUE) {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {