0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-02-23 08:28:36 +00:00
nextcloud_server/apps/files_external/lib/Lib/Storage/SystemBridge.php
Robin Appelman 103b464eea fix: use nc's binary finding logic for smb
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-10-04 15:56:31 +02:00

27 lines
575 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Robin Appelman <robin@icewind.nl>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Files_External\Lib\Storage;
use Icewind\SMB\System;
use OCP\IBinaryFinder;
/**
* Bridge the NC and SMB binary finding logic
*/
class SystemBridge extends System {
public function __construct(
private IBinaryFinder $binaryFinder,
) {
}
protected function getBinaryPath(string $binary): ?string {
$path = $this->binaryFinder->findBinaryPath($binary);
return $path !== false ? $path : null;
}
}