Commit 9f1260e3 authored by Cyril Rohr's avatar Cyril Rohr
Browse files

Modified generator so that it doesn't write a hard link if it already exists

parent 04e3cf52
......@@ -121,12 +121,12 @@ class ReferenceGenerator
groups.has_key?(G5K::Link) and groups[G5K::Link].each do |link|
from = File.join(repository, "#{link.from}.json")
to = File.join(repository, link.path)
# Hard links will always be regenerated
# TODO: find a way to detect if a link has to be regenerated
unless File.exists?(to)
puts "Hard link to be written = \t#{to} -> #{from}", to, :force => true) unless options[:simulate]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment