Skip to content
Snippets Groups Projects
Commit 061abb88 authored by Björn Schießle's avatar Björn Schießle
Browse files

write a warning to the log file if .htaccess is not writable instead of failing silently

parent d71c4db1
No related branches found
No related tags found
No related merge requests found
......@@ -373,10 +373,12 @@ class OC_Files {
}
}
//supress errors in case we don't have permissions for it
if(@file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess)) {
return OC_Helper::computerFileSize($size);
}
//check for write permissions
if(is_writable(OC::$SERVERROOT.'/.htaccess')) {
file_put_contents(OC::$SERVERROOT.'/.htaccess', $htaccess);
return OC_Helper::computerFileSize($size);
} else { OC_Log::write('files','Can\'t write upload limit to '.OC::$SERVERROOT.'/.htaccess. Please check the file permissions',OC_Log::WARN); }
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment