[PATCH] [cmd]: fix 'copy foo bar/' which gave access denied errors (#6722)

Eric Pouech eric.pouech at wanadoo.fr
Tue Dec 26 10:51:24 CST 2006


This time, without unwanted stuff in it

A+
---

 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-patches mailing list