Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Jan 29, 2025
2 parents 24b611f + d853605 commit dfce842
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tine20/Tinebase/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -3591,6 +3591,17 @@ public function syncFlySystems(): bool

static public $syncFlySystemRecursionCache = [];

/**
* @param Tinebase_Model_Tree_Node $node
* @param int $depth
* @return void
* @throws Tinebase_Exception_InvalidArgument
* @throws Tinebase_Exception_NotFound
* @throws Tinebase_Exception_Record_NotAllowed
* @throws Tinebase_Exception_Record_Validation
* @throws Tinebase_Exception_SystemGeneric
* @throws \League\Flysystem\FilesystemException
*/
public function syncFlySystem(Tinebase_Model_Tree_Node $node, int $depth = -1): void
{
if (isset(static::$syncFlySystemRecursionCache[$node->getId()])) return;
Expand All @@ -3605,14 +3616,14 @@ public function syncFlySystem(Tinebase_Model_Tree_Node $node, int $depth = -1):
if (Tinebase_Model_Tree_FileObject::TYPE_FOLDER === $node->type) {
try {
$dirExists = ! empty($node->flypath) && $flySystem->directoryExists($node->flypath);
} catch (Sabre\HTTP\ClientHttpException $shche) {
if ($shche->getMessage() === 'Gateway Timeout' || $shche->getMessage() === 'Service Unavailable') {
// just log and try again later
} catch (Exception $e) {
// just log and try again later
// TODO are there errors that need a hard break & throwing here?
if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) {
Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
. ' Flysystem error on path "' . $node->flypath . '" : ' . $shche->getMessage());
return;
. ' Flysystem error on path "' . $node->flypath . '" : ' . $e->getMessage());
}
throw $shche;
return;
}

if (!$dirExists) {
Expand Down

0 comments on commit dfce842

Please sign in to comment.