Skip to content
Snippets Groups Projects
Commit 120e800f authored by Olav Morken's avatar Olav Morken
Browse files

metarefresh: Fix creation of output directory.

Patch created by Thijs Kinkhorst <thijs@kinkhorst.com>.

Fixes issue 296.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2225 44740490-163a-0410-bde0-09ae8108e29a
parent 66edcf71
No related branches found
No related tags found
No related merge requests found
...@@ -186,9 +186,11 @@ class sspmod_metarefresh_MetaLoader { ...@@ -186,9 +186,11 @@ class sspmod_metarefresh_MetaLoader {
} }
if(!file_exists($outputDir)) { if(!file_exists($outputDir)) {
if (!is_writable($outputDir)) throw new Exception('Permission denied creating directory: ' . $outputDir);
SimpleSAML_Logger::info('Creating directory: ' . $outputDir . "\n"); SimpleSAML_Logger::info('Creating directory: ' . $outputDir . "\n");
mkdir($outputDir, 0777, TRUE); $res = @mkdir($outputDir, 0777, TRUE);
if ($res === FALSE) {
throw new Exception('Error creating directory: ' . $outputDir);
}
} }
foreach($this->metadata as $category => $elements) { foreach($this->metadata as $category => $elements) {
......
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