Little fix, when a environment don't have output directory on its shared folder
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Exporter;
|
||||
|
||||
use ProcessMaker\Util;
|
||||
|
||||
/**
|
||||
* Class XmlExporter
|
||||
*
|
||||
@@ -120,6 +122,12 @@ class XmlExporter extends Exporter
|
||||
*/
|
||||
public function saveExport($outputFile)
|
||||
{
|
||||
$parentDir = dirname($outputFile);
|
||||
|
||||
if (! is_dir($parentDir)) {
|
||||
Util\Common::mk_dir($parentDir, 0775);
|
||||
}
|
||||
|
||||
file_put_contents($outputFile, $this->export());
|
||||
chmod($outputFile, 0755);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user