Merge pull request #1671 from Jennydmz/BUG-11423

BUG 11423 Errors when restoring a ws with the Enterprise plugin enabled. SOLVED
This commit is contained in:
julceslauhub
2013-05-02 08:42:38 -07:00
2 changed files with 16 additions and 4 deletions

View File

@@ -1099,6 +1099,12 @@ class workspaceTools
foreach ($metadata->directories as $dir) {
CLI::logging("+> Restoring directory '$dir'\n");
if(file_exists("$tempDirectory/$dir" . "/ee")) {
G::rm_dir("$tempDirectory/$dir" . "/ee");
}
if(file_exists("$tempDirectory/$dir" . "/plugin.singleton")) {
G::rm_dir("$tempDirectory/$dir" . "/plugin.singleton");
}
if (!rename("$tempDirectory/$dir", $workspace->path)) {
throw new Exception("There was an error copying the backup files ($tempDirectory/$dir) to the workspace directory {$workspace->path}.");
}