Commit bd041583 authored by Daniel Barden's avatar Daniel Barden

[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.
parent bc43a69e
...@@ -103,7 +103,7 @@ module Pod ...@@ -103,7 +103,7 @@ module Pod
# We don't want to lock diretories, as that forces you to override # We don't want to lock diretories, as that forces you to override
# those permissions if you decide to delete the Pods folder. # those permissions if you decide to delete the Pods folder.
Dir.glob(root + '**/*').each do |file| Dir.glob(root + '**/*').each do |file|
unless File.directory?(file) if File.file?(file)
File.chmod(0444, file) File.chmod(0444, file)
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment