summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-25 01:01:37 +0200
committerhut <hut@lavabit.com>2011-09-25 01:01:37 +0200
commitbbaf1b089b814bde00aa08a76a66629ece92837c (patch)
tree60b28d47325e0774b06afb670e7bf34e096b3fde /ranger
parent1c6485c6e0eae47be5e0ec19e46fa1a0058fe91e (diff)
downloadranger-bbaf1b089b814bde00aa08a76a66629ece92837c.tar.gz
documented and improved DaPangus' changes
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/commands.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index a96c842c..3327c221 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -647,6 +647,9 @@ class rename(Command):
 		if not new_name:
 			return self.fm.notify('Syntax: rename <newname>', bad=True)
 
+		if new_name == self.fm.env.cf.basename:
+			return
+
 		if access(new_name, os.F_OK):
 			return self.fm.notify("Can't rename: file already exists!", bad=True)