check if maps dir is writable
This commit is contained in:
parent
79c1260cb5
commit
8208ab5f6d
@ -292,7 +292,7 @@ class MapManager implements CallbackListener {
|
|||||||
$fullMapFileName = $downloadDirectory . $fileName;
|
$fullMapFileName = $downloadDirectory . $fileName;
|
||||||
|
|
||||||
// Check if it can get written locally
|
// Check if it can get written locally
|
||||||
if (is_dir($mapDir)) {
|
if (is_dir($mapDir) && is_writable($mapDir)) {
|
||||||
// Create download directory if necessary
|
// Create download directory if necessary
|
||||||
if (!is_dir($downloadDirectory) && !mkdir($downloadDirectory)) {
|
if (!is_dir($downloadDirectory) && !mkdir($downloadDirectory)) {
|
||||||
trigger_error("ManiaControl doesn't have to rights to save maps in '{$downloadDirectory}'.");
|
trigger_error("ManiaControl doesn't have to rights to save maps in '{$downloadDirectory}'.");
|
||||||
|
Loading…
Reference in New Issue
Block a user