cmd: Fix 'copy foo bar/' which gave access denied errors.
This commit is contained in:
parent
bad3434330
commit
b7923b4200
|
@ -126,6 +126,8 @@ char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetFullPathName (param2, sizeof(outpath), outpath, NULL);
|
GetFullPathName (param2, sizeof(outpath), outpath, NULL);
|
||||||
|
if (outpath[strlen(outpath) - 1] == '\\')
|
||||||
|
outpath[strlen(outpath) - 1] = '\0';
|
||||||
hff = FindFirstFile (outpath, &fd);
|
hff = FindFirstFile (outpath, &fd);
|
||||||
if (hff != INVALID_HANDLE_VALUE) {
|
if (hff != INVALID_HANDLE_VALUE) {
|
||||||
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
|
|
Loading…
Reference in New Issue