Skip to content

Commit

Permalink
#2189 쉬운 설치 후 복제된 파일들에 대한 status cache 및 opcache 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
bnu committed Dec 6, 2017
1 parent 23ec7b7 commit 829b767
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions modules/autoinstall/autoinstall.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ function _copyDir(&$file_list)
return $output;
}
$target_dir = $this->ftp_info->ftp_root_path . $this->target_path;
$copied = array();

if(is_array($file_list))
{
Expand All @@ -475,8 +476,13 @@ function _copyDir(&$file_list)
}

ssh2_scp_send($this->connection, FileHandler::getRealPath($this->download_path . "/" . $org_file), $target_dir . "/" . $file);
$copied[] = $path;
}
}

FileHandler::clearStatCache($copied, true);
FileHandler::invalidateOpcache($copied);

return new BaseObject();
}

Expand Down Expand Up @@ -630,6 +636,7 @@ function _copyDir(&$file_list)
$this->download_path = substr($this->download_path, 0, -1);
}
$target_dir = $this->ftp_info->ftp_root_path . $this->target_path;
$copied = array();

if(is_array($file_list))
{
Expand Down Expand Up @@ -688,8 +695,13 @@ function _copyDir(&$file_list)
{
return new BaseObject(-1, "msg_ftp_upload_failed");
}
$copied[] = $path;
}
}

FileHandler::clearStatCache($copied, true);
FileHandler::invalidateOpcache($copied);

$this->_close();
return new BaseObject();
}
Expand Down Expand Up @@ -829,6 +841,8 @@ function _copyDir(&$file_list)
$oFtp = &$this->oFtp;
$target_dir = $this->ftp_info->ftp_root_path . $this->target_path;

$copied = array();

if(is_array($file_list))
{
foreach($file_list as $k => $file)
Expand Down Expand Up @@ -859,9 +873,13 @@ function _copyDir(&$file_list)
}
}
$oFtp->ftp_put($target_dir . '/' . $file, FileHandler::getRealPath($this->download_path . "/" . $org_file));
$copied[] = $path;
}
}

FileHandler::clearStatCache($copied, true);
FileHandler::invalidateOpcache($copied);

$this->_close();

return new BaseObject();
Expand Down Expand Up @@ -957,6 +975,7 @@ function _copyDir(&$file_list)
return $output;
}
$target_dir = $this->target_path;
$copied = array();

if(is_array($file_list))
{
Expand Down Expand Up @@ -984,9 +1003,13 @@ function _copyDir(&$file_list)
}
}
FileHandler::copyFile( FileHandler::getRealPath($this->download_path . "/" . $org_file), FileHandler::getRealPath("./" . $target_dir . '/' . $file));
$copied[] = $path;
}
}

FileHandler::clearStatCache($copied, true);
FileHandler::invalidateOpcache($copied);

$this->_close();

return new BaseObject();
Expand Down

0 comments on commit 829b767

Please sign in to comment.