diff --git a/app/modules/tag/manifest.json b/app/modules/tag/manifest.json index 87665ad..3967dd6 100644 --- a/app/modules/tag/manifest.json +++ b/app/modules/tag/manifest.json @@ -1,6 +1,6 @@ { "name": "Tags", - "version": "0.1", + "version": "0.2", "author": "ITGuild", "slug": "tag", "description": "Tags module", diff --git a/kernel/services/ModuleService.php b/kernel/services/ModuleService.php index 80b140c..3439e17 100644 --- a/kernel/services/ModuleService.php +++ b/kernel/services/ModuleService.php @@ -343,10 +343,15 @@ class ModuleService $tmpModuleDirFull = RESOURCES_DIR . '/tmp/ad/' . $moduleName . "/"; $fileHelper = new Files(); - $fileHelper->copy_folder(APP_DIR . '/modules/' . $moduleName, $tmpModuleDirFull . 'app/'); - $fileHelper->copy_folder(KERNEL_APP_MODULES_DIR . '/' . $moduleName, $tmpModuleDirFull . 'kernel/'); + $fileHelper->copy_folder(ROOT_DIR . $path, $tmpModuleDirFull . 'app/'); + if (file_exists(KERNEL_APP_MODULES_DIR . '/' . $moduleName)){ + $fileHelper->copy_folder(KERNEL_APP_MODULES_DIR . '/' . $moduleName, $tmpModuleDirFull . 'kernel/'); + } + else { + mkdir($tmpModuleDirFull . 'kernel/'); + } - if (!is_dir(RESOURCES_DIR . '/tmp/module')) { + if (!is_dir(RESOURCES_DIR . '/tmp/modules')) { mkdir(RESOURCES_DIR . '/tmp/modules', 0777, true); } $fileHelper->pack($tmpModuleDirFull, RESOURCES_DIR . '/tmp/modules/' . $moduleName . '.itguild');