Description:
locks dir based on temp file, does not copy dir when copying scripts, added proper rescue for ln_s
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r103:933325ce824a - - 4 files changed: 4 inserted, 3 deleted
@@ -25,7 +25,7 | |||
|
25 | 25 | # Check if someone has initialized the dir. If not, call block. |
|
26 | 26 | |
|
27 | 27 | def setup # :yields: block |
|
28 | - dir = File.new(@dir_name) | |
|
28 | + dir = File.new(@dir_name + '/lockfile',"w+") | |
|
29 | 29 | dir.flock(File::LOCK_EX) |
|
30 | 30 | begin |
|
31 | 31 | counter_filename = get_counter_filename |
@@ -136,6 +136,7 | |||
|
136 | 136 | |
|
137 | 137 | scripts.each do |s| |
|
138 | 138 | fname = File.basename(s) |
|
139 | + next if FileTest.directory?(s) | |
|
139 | 140 | if !FileTest.exist?("#{script_dir}/#{fname}") |
|
140 | 141 | copied << fname |
|
141 | 142 | FileUtils.cp(s, "#{script_dir}") |
You need to be logged in to leave comments.
Login now