diff --git a/admin/controller/module/intarocrm.php b/admin/controller/module/intarocrm.php index 2c04773..d6cce08 100644 --- a/admin/controller/module/intarocrm.php +++ b/admin/controller/module/intarocrm.php @@ -390,7 +390,13 @@ class ControllerModuleIntarocrm extends Controller { } public function export() { - file_put_contents(__DIR__ . '/../../../download/intarocrm.xml', $this->xml()); + $downloadPath = __DIR__ . '/../../../download/'; + + if (!file_exists($downloadPath)) { + mkdir($downloadPath, 0755); + } + + file_put_contents($downloadPath . 'intarocrm.xml', $this->xml()); } private function validate() {