Eric Pouech : cmd: Fix 'copy foo bar/' which gave access denied
errors.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 27 10:37:34 CST 2006
Module: wine
Branch: master
Commit: b7923b42005a6b4d8bbd0176241757acae04f33d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b7923b42005a6b4d8bbd0176241757acae04f33d
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Tue Dec 26 17:51:24 2006 +0100
cmd: Fix 'copy foo bar/' which gave access denied errors.
---
programs/cmd/builtins.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 8a79b98..08972e5 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) {
More information about the wine-cvs
mailing list