ref: a2cc344d7c9d5373c0bcc3d5d842ee299d159960
parent: 1c0fa9831213db402235433ce9fdbbb2fa8a5356
author: phil9 <telephil9@gmail.com>
date: Thu Dec 29 18:32:21 EST 2022
fix erroneous string comparison preventing renames in certain cases
--- a/dirviewcmd.c
+++ b/dirviewcmd.c
@@ -108,9 +108,9 @@
return;
}
snprint(buf, sizeof buf, d[0].name);
- if((n = input("rename to:", buf, sizeof buf, mc, kc)) <= 0)
+ if(input("rename to:", buf, sizeof buf, mc, kc) <= 0)
return;
- if(strncmp(buf, d[0].name, n) == 0){
+ if(strcmp(buf, d[0].name) == 0){
errormessage("target file name should be different.", mc, kc);
return;
}