[PATCH] [cmd]: fix 'copy foo bar/' which gave access denied errors
(#6722)
Eric Pouech
eric.pouech at wanadoo.fr
Tue Dec 26 10:18:32 CST 2006
A+
---
dlls/kernel32/file.c | 1 +
programs/cmd/builtins.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 5a0c5cb..8c3c1e9 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -1613,6 +1613,7 @@ HANDLE WINAPI FindFirstFileExW( LPCWSTR
}
else if (!mask || !*mask)
{
+ FIXME("dsffs\n");
SetLastError( ERROR_FILE_NOT_FOUND );
goto error;
}
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 8a79b98..82fcae3 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -126,6 +126,8 @@ char string[8], outpath[MAX_PATH], inpat
}
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) {
@@ -148,6 +150,7 @@ char string[8], outpath[MAX_PATH], inpat
else force = TRUE;
}
if (force) {
+ printf("--> %s\n", outpath);
status = CopyFile (param1, outpath, FALSE);
if (!status) WCMD_print_error ();
}
More information about the wine-patches
mailing list