Revision: 2225
Author: olavmrk
Date: Fri Mar 19 00:58:02 2010
Log: metarefresh: Fix creation of output directory.

Patch created by Thijs Kinkhorst <[email protected]>.

Fixes issue 296.
http://code.google.com/p/simplesamlphp/source/detail?r=2225

Modified:
 /trunk/modules/metarefresh/lib/MetaLoader.php

=======================================
--- /trunk/modules/metarefresh/lib/MetaLoader.php       Thu Nov  5 04:08:00 2009
+++ /trunk/modules/metarefresh/lib/MetaLoader.php       Fri Mar 19 00:58:02 2010
@@ -186,9 +186,11 @@
                }

                if(!file_exists($outputDir)) {
- if (!is_writable($outputDir)) throw new Exception('Permission denied creating directory: ' . $outputDir);
                        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) {

--
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.

Reply via email to