From 0b2fc4cf379dec82290c5bc9cc71ce8dc4e4f28b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 23 May 2020 14:56:13 +0900 Subject: [PATCH] extlibs.rb: make symlink only if the target exists --- tool/extlibs.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/tool/extlibs.rb b/tool/extlibs.rb index 33462ceb1d..720f1c767d 100755 --- a/tool/extlibs.rb +++ b/tool/extlibs.rb @@ -99,6 +99,7 @@ class ExtLibs if (target = src).start_with?("/") target = File.join([".."] * file.count("/"), src) end + return unless File.exist?(File.expand_path(target, File.dirname(file))) File.unlink(file) rescue nil begin File.symlink(target, file)