cmd: Fix 'copy foo bar/' which gave access denied errors.
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 @@
   }
 
   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) {