Skip to content

Commit

Permalink
[Installer] Check for regular file on lock
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dbarden committed May 6, 2015
1 parent bc43a69 commit bd04158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cocoapods/installer/pod_source_installer.rb
Expand Up @@ -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
Expand Down

0 comments on commit bd04158

Please sign in to comment.