lib/fig/environment.rb in fig-0.1.32 vs lib/fig/environment.rb in fig-0.1.33
- old
+ new
@@ -144,10 +144,13 @@
# after the '//' when doing a retrieve.
if file.split('//').size > 1
preserved_path = file.split('//').last
target = File.join(@retrieve_vars[name].gsub(/\[package\]/, base_package.package_name), preserved_path)
else
- target = File.join(@retrieve_vars[name].gsub(/\[package\]/, base_package.package_name), File.basename(file))
+ target = File.join(@retrieve_vars[name].gsub(/\[package\]/, base_package.package_name))
+ if not File.directory?(file)
+ target = File.join(target, File.basename(file))
+ end
end
unless @os.exist?(target) && @os.mtime(target) >= @os.mtime(file)
@os.log_info("retrieving #{target}")
@os.copy(file, target)
end