-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use nc's binary finding logic for smb
Signed-off-by: Robin Appelman <robin@icewind.nl>
- Loading branch information
1 parent
4f88123
commit ca2ae8e
Showing
5 changed files
with
37 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters