diff options
| author | Charlie Sharpsteen | 2012-09-23 12:22:15 -0500 |
|---|---|---|
| committer | Charlie Sharpsteen | 2012-09-24 16:31:51 -0500 |
| commit | 5608ad6dae59a3e2bcf45ee705a37ec20cd8e290 (patch) | |
| tree | a9c7d38491bced43ae8e01ab6999cf04e7f27778 | |
| parent | 96905ebc241d13b01a32f861eeb24a36e8303fe0 (diff) | |
| download | homebrew-5608ad6dae59a3e2bcf45ee705a37ec20cd8e290.tar.bz2 | |
Check all file modes, not just writable
We run a `chmod g+rwx` to set read, write and execute permissions but only use
`File.writable?` to detect which directories need this. Since we are setting
read and execute permissions, we should also use `File.readable?` and
`File.executable?`.
| -rw-r--r-- | install | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -108,7 +108,7 @@ chmods = %w( . bin etc include lib lib/pkgconfig Library sbin share var var/log share/man/man5 share/man/man6 share/man/man7 share/man/man8 share/info share/doc share/aclocal ). map{ |d| "#{HOMEBREW_PREFIX}/#{d}" }. - select{ |d| File.directory? d and not File.writable? d } + select{ |d| File.directory? d and (not File.readable? d or not File.writable? d or not File.executable? d) } chgrps = chmods.reject{ |d| File.stat(d).grpowned? } unless chmods.empty? |
