check if plugin directory exists and warn the user

This commit is contained in:
Christian Mehlmauer
2012-09-23 22:55:19 +02:00
parent a15028793e
commit c0c14faad1
2 changed files with 13 additions and 0 deletions

View File

@@ -109,6 +109,10 @@ class WpTarget
@wp_plugins_dir
end
def wp_plugins_dir_exists?
Browser.instance.get(@uri.merge(wp_plugins_dir)).code != 404
end
def has_debug_log?
# We only get the first 700 bytes of the file to avoid loading huge file (like 2Go)
response_body = Browser.instance.get(debug_log_url(), :headers => {"range" => "bytes=0-700"}).body