aboutsummaryrefslogtreecommitdiff
path: root/check.cgi
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@mgm-sp.de>2015-11-14 10:24:37 +0100
committerBenjamin Kellermann <Benjamin.Kellermann@mgm-sp.de>2015-11-14 10:24:37 +0100
commitcd558ab9ebfdb4dfa44a32b1938d6a2e760d38ac (patch)
tree046148efbeee901f7bc0acb9ce2e061ac5515333 /check.cgi
parent1f864db5358b5c506e424b5e5fb82ae4e38adbc3 (diff)
Easier check for writability
Diffstat (limited to '')
-rwxr-xr-xcheck.cgi7
1 files changed, 2 insertions, 5 deletions
diff --git a/check.cgi b/check.cgi
index 4d0c810..dc45f60 100755
--- a/check.cgi
+++ b/check.cgi
@@ -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