diff --git a/web_service/ws/Workspace.class.inc b/web_service/ws/Workspace.class.inc index 07a23d46851c83cd464c1eb8445c26eae394af73..267f7b4811aa535e545f712f68277ae0dad50f4c 100755 --- a/web_service/ws/Workspace.class.inc +++ b/web_service/ws/Workspace.class.inc @@ -273,14 +273,8 @@ class Workspace extends GTF { if ($this->oConnection->oBd->enErreur()) { $this->oError = new VitisError(1, $this->oConnection->oBd->getBDMessage()); } else { - $this->aFields['workspace_id'] = $this->aValues["my_vitis_id"]; - - $sDirName = $this->aProperties['workspace_dir'] . "/" . $this->aFields["workspace_id"] . "/"; - if (is_dir($sDirName)) { - clearDir($sDirName); - } else { - writeToErrorLog("No folder link with this workspace. verify if the workspace folder already exist on the server"); - } + // Suppression du répertoire du projet FME. + deleteDirectoryInWsDataDir('gtf', 'workspace', $this->aValues["my_vitis_id"], '', ''); } } diff --git a/web_service/ws/Workspaces.class.inc b/web_service/ws/Workspaces.class.inc index 6f6592a697de29717bf1fc8e5e56c8bc747ce9fd..1c01ecbbc2d06e0e60af01e68471902221a2d81b 100755 --- a/web_service/ws/Workspaces.class.inc +++ b/web_service/ws/Workspaces.class.inc @@ -502,8 +502,7 @@ class Workspaces extends GTF { } $sDirName = $this->aProperties['workspace_dir'] . "/" . $oWorkspace->aFields["workspace_id"]; // Si le répertoire existe déja : suppression. - if (is_dir($sDirName)) - clearDir($sDirName); + deleteDirectoryInWsDataDir('gtf', 'workspace', $this->aValues["my_vitis_id"], '', ''); // Upload du fichier fmw. $this->aValues['fme'] = $this->aValues['fmw_file']; $_FILES['fme'] = $_FILES['fmw_file'];