summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-27 23:33:16 +0200
committerhut <hut@lavabit.com>2011-09-27 23:33:16 +0200
commit496c00d4200ff25c833bbaf03ee04a6031d83b92 (patch)
treeb4a3e0479c63eb852055cfa3778f9a8916f6c844
parentbbaf1b089b814bde00aa08a76a66629ece92837c (diff)
downloadranger-496c00d4200ff25c833bbaf03ee04a6031d83b92.tar.gz
defaults.commands: optimization of touch command
-rw-r--r--ranger/defaults/commands.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index 3327c221..6d6620e1 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -575,7 +575,7 @@ class touch(Command):
 		line = parse(self.line)
 		fname = join(self.fm.env.cwd.path, expanduser(line.rest(1)))
 		if not lexists(fname):
-			open(fname, 'a')
+			open(fname, 'a').close()
 		else:
 			self.fm.notify("file/directory exists!", bad=True)