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

@@ -917,6 +917,12 @@ class Archive_Tar extends PEAR
if ($v_filename == '')
continue;
if($v_filename == $p_remove_dir.'/plugin.singleton')
continue;
if($v_filename == $p_remove_dir.'/ee')
continue;
// ----- ignore files and directories matching the ignore regular expression
if ($this->_ignore_regexp && preg_match($this->_ignore_regexp, '/'.$v_filename)) {
$this->_warning("File '$v_filename' ignored");

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}.");
}