diff options
author | Benjamin Kellermann <Benjamin.Kellermann@mgm-sp.de> | 2015-11-14 10:24:37 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@mgm-sp.de> | 2015-11-14 10:24:37 +0100 |
commit | cd558ab9ebfdb4dfa44a32b1938d6a2e760d38ac (patch) | |
tree | 046148efbeee901f7bc0acb9ce2e061ac5515333 /check.cgi | |
parent | 1f864db5358b5c506e424b5e5fb82ae4e38adbc3 (diff) |
Easier check for writability
Diffstat (limited to '')
-rwxr-xr-x | check.cgi | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -46,11 +46,8 @@ unless File.exists?("locale/de/dudle.mo") problems << ["If you want a language other than English, you will need a localization and therefore need ot build the .mo files. Refer the README for details."] end -begin - dir = "." - File.open("#{dir}koSai8ahye9shoTh","w") -rescue Errno::EACCES => e - problems << ["Your webserver needs write access to #{dir}"] +unless File.writable?(".") + problems << ["Your webserver needs write access to #{File.expand_path(".")}"] end rescue Exception => e |