Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/LogFileAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ private static function getFilesystem($args)
'passive' => true,
'ssl' => false,
'timeout' => 30,
'root' => '/',
];
$args['filesystem'] = new Filesystem(new Ftp([
'host' => $args['host'],
Expand All @@ -38,6 +39,7 @@ private static function getFilesystem($args)
'passive' => isset($args['passive']) ? $args['passive'] : $default['passive'],
'ssl' => isset($args['ssl']) ? $args['ssl'] : $default['ssl'],
'timeout' => isset($args['timeout']) ? $args['timeout'] : $default['timeout'],
'root' => isset($args['root']) ? $args['root'] : $default['root'],
]));
break;
case 'sftp':
Expand All @@ -46,6 +48,7 @@ private static function getFilesystem($args)
'passive' => true,
'ssl' => false,
'timeout' => 30,
'root' => '/',
];
$config = [
'host' => $args['host'],
Expand All @@ -55,6 +58,7 @@ private static function getFilesystem($args)
'passive' => isset($args['passive']) ? $args['passive'] : $default['passive'],
'ssl' => isset($args['ssl']) ? $args['ssl'] : $default['ssl'],
'timeout' => isset($args['timeout']) ? $args['timeout'] : $default['timeout'],
'root' => isset($args['root']) ? $args['root'] : $default['root'],
];
if (isset($args['private_key'])) {
$config['privateKey'] = $args['private_key'];
Expand Down
2 changes: 1 addition & 1 deletion lib/LogFileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private function deleteCache(LogFile $logFile)

public function emptyCache()
{
$cache = $this->cache->get('/')->getContents();
$cache = $this->cache->listContents('/');
foreach ($cache as $file) {
if ($file['type'] == 'file' && substr($file['basename'], 0, 1) !== '.') {
$this->cache->delete($file['path']);
Expand Down