aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rw-r--r--tool/downloader.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index a8c47f02c7..0498e3f95c 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -225,15 +225,17 @@ class Downloader
def self.link_cache(cache, file, name, verbose = false)
return false unless cache and cache.exist?
return true if cache.eql?(file)
- begin
- file.make_symlink(cache.relative_path_from(file.parent))
- rescue SystemCallError
- else
- if verbose
- $stdout.puts "made symlink #{name} to #{cache}"
- $stdout.flush
+ if /cygwin/ !~ RUBY_PLATFORM or /winsymlink:nativestrict/ =~ ENV['CYGWIN']
+ begin
+ file.make_symlink(cache.relative_path_from(file.parent))
+ rescue SystemCallError
+ else
+ if verbose
+ $stdout.puts "made symlink #{name} to #{cache}"
+ $stdout.flush
+ end
+ return true
end
- return true
end
begin
file.make_link(cache)