summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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)