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:
6
gulliver/thirdparty/pear/Archive/Tar.php
vendored
6
gulliver/thirdparty/pear/Archive/Tar.php
vendored
@@ -917,6 +917,12 @@ class Archive_Tar extends PEAR
|
|||||||
if ($v_filename == '')
|
if ($v_filename == '')
|
||||||
continue;
|
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
|
// ----- ignore files and directories matching the ignore regular expression
|
||||||
if ($this->_ignore_regexp && preg_match($this->_ignore_regexp, '/'.$v_filename)) {
|
if ($this->_ignore_regexp && preg_match($this->_ignore_regexp, '/'.$v_filename)) {
|
||||||
$this->_warning("File '$v_filename' ignored");
|
$this->_warning("File '$v_filename' ignored");
|
||||||
|
|||||||
@@ -1099,6 +1099,12 @@ class workspaceTools
|
|||||||
foreach ($metadata->directories as $dir) {
|
foreach ($metadata->directories as $dir) {
|
||||||
CLI::logging("+> Restoring directory '$dir'\n");
|
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)) {
|
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}.");
|
throw new Exception("There was an error copying the backup files ($tempDirectory/$dir) to the workspace directory {$workspace->path}.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user