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)
 
59f88ebf2b2'>a7d89e0e ^
e8fc80f5 ^
a7d89e0e ^
f9737251 ^











a7d89e0e ^

9cff3735 ^

a7df149e ^
fe519410 ^

cfef64c7 ^
6246c8b9 ^
b3f60232 ^
2490f5b4 ^
6a32ed45 ^
eb105e91 ^


fa53e238 ^
eb550eed ^
e0dfe483 ^

2fafaec8 ^

fd6620a9 ^
a7df149e ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57