From 9d90abe1b9f22809bf0249147803167e0e9e1e04 Mon Sep 17 00:00:00 2001 From: Kim Lilliestierna Date: Sat, 27 Jan 2007 15:26:03 +0100 Subject: [PATCH] cmd: Fix the "move" command the same way as the "copy" command. --- programs/cmd/builtins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 018a8e01221..49548de73ca 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -519,6 +519,8 @@ HANDLE hff; /* If 2nd parm is directory, then use original filename */ 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) {