[cmd] rename inside directories fails due to typo

Ann and Jason Edmeades jason at edmeades.me.uk
Mon Sep 3 16:52:44 CDT 2012


Renaming a file inside a subdirectory fails due to a very basic
typo. Comment says check destination, code checks source....

[BUG30534]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120903/ea9ba1ba/attachment.html>
-------------- next part --------------
From 03edab7c4bbcb8eb57ef39487fbaa5af5a9691ed Mon Sep 17 00:00:00 2001
From: Jason Edmeades <jason at edmeades.me.uk>
Date: Mon, 3 Sep 2012 22:48:08 +0100
Subject: [cmd] rename inside directories fails due to typo

Renaming a file inside a subdirectory fails due to a very basic
typo. Comment says check destination, code checks source....

[BUG30534]
---
 programs/cmd/builtins.c                  |    2 +-
 programs/cmd/tests/test_builtins.cmd.exp |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index c92822b..16f4eff 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -1872,7 +1872,7 @@ void WCMD_rename (void)
   }
 
   /* Destination cannot contain a drive letter or directory separator */
-  if ((strchrW(param1,':') != NULL) || (strchrW(param1,'\\') != NULL)) {
+  if ((strchrW(param2,':') != NULL) || (strchrW(param2,'\\') != NULL)) {
       SetLastError(ERROR_INVALID_PARAMETER);
       WCMD_print_error();
       errorlevel = 1;
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index c444be6..b7bcd96 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -629,8 +629,8 @@ read-only file renamed
 dir renamed
 read-only dir renamed
 --- rename in other directory
- at todo_wine@rename impossible in other directory
- at todo_wine@original file still present
+rename impossible in other directory
+original file still present
 ------------ Testing move ------------
 --- file move
 file move succeeded
-- 
1.7.5.4


More information about the wine-patches mailing list