From bd041583e9f4a45bf7a3cb46bdf58d7378f4078c Mon Sep 17 00:00:00 2001 From: Daniel Barden Date: Tue, 5 May 2015 13:46:15 +0200 Subject: [PATCH] [Installer] Check for regular file on lock This patch check if a file is a regular file instead of checking if the file is a directory. It fixes a crash when the file being analysed is a broken symbolic link. --- lib/cocoapods/installer/pod_source_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cocoapods/installer/pod_source_installer.rb b/lib/cocoapods/installer/pod_source_installer.rb index d58fae5758..93e5574096 100644 --- a/lib/cocoapods/installer/pod_source_installer.rb +++ b/lib/cocoapods/installer/pod_source_installer.rb @@ -103,7 +103,7 @@ def lock_files! # We don't want to lock diretories, as that forces you to override # those permissions if you decide to delete the Pods folder. Dir.glob(root + '**/*').each do |file| - unless File.directory?(file) + if File.file?(file) File.chmod(0444, file) end end