Description:
fixed bug in dir_init teardown (wrong log filename)
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r109:f75d1acc9cdd - - 1 file changed: 6 inserted, 2 deleted

@@ -22,10 +22,14
22 22 @usage_filename = usage_filename
23 23 end
24 24
25 + def lock_filename
26 + return @dir_name + '/lockfile'
27 + end
28 +
25 29 # Check if someone has initialized the dir. If not, call block.
26 30
27 31 def setup # :yields: block
28 - dir = File.new(@dir_name + '/lockfile',"w+")
32 + dir = File.new(lock_filename,"w+")
29 33 dir.flock(File::LOCK_EX)
30 34 begin
31 35 counter_filename = get_counter_filename
@@ -64,7 +68,7
64 68 # Check if I am the last one using the dir. If true, call block.
65 69
66 70 def teardown
67 - dir = File.new(@dir_name)
71 + dir = File.new(lock_filename)
68 72 dir.flock(File::LOCK_EX)
69 73 begin
70 74 counter_filename = get_counter_filename
You need to be logged in to leave comments. Login now