mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Merge pull request #56816 from nextcloud/jtr/chore-legacy-drop-mac-checker
This commit is contained in:
commit
842df498e0
3 changed files with 5 additions and 17 deletions
|
|
@ -185,10 +185,11 @@ class Setup {
|
|||
}
|
||||
}
|
||||
|
||||
if (\OC_Util::runningOnMac()) {
|
||||
// Check if running directly on macOS (note: Linux containers on macOS will not trigger this)
|
||||
if (PHP_OS_FAMILY === 'Darwin') {
|
||||
$errors[] = [
|
||||
'error' => $this->l10n->t(
|
||||
'Mac OS X is not supported and %s will not work properly on this platform. '
|
||||
'macOS is not supported and %s will not work properly on this platform. '
|
||||
. 'Use it at your own risk!',
|
||||
[$this->defaults->getProductName()]
|
||||
),
|
||||
|
|
|
|||
|
|
@ -732,15 +732,6 @@ class OC_Util {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the server is running on Mac OS X
|
||||
*
|
||||
* @return bool true if running on Mac OS X, false otherwise
|
||||
*/
|
||||
public static function runningOnMac() {
|
||||
return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN');
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the case that there may not be a theme, then check if a "default"
|
||||
* theme exists and take that one
|
||||
|
|
|
|||
|
|
@ -805,15 +805,11 @@ class ViewTest extends \Test\TestCase {
|
|||
$ds = DIRECTORY_SEPARATOR;
|
||||
/*
|
||||
* 4096 is the maximum path length in file_cache.path in *nix
|
||||
* 1024 is the max path length in mac
|
||||
*/
|
||||
$folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789';
|
||||
$tmpdirLength = strlen(Server::get(ITempManager::class)->getTemporaryFolder());
|
||||
if (\OC_Util::runningOnMac()) {
|
||||
$depth = ((1024 - $tmpdirLength) / 57);
|
||||
} else {
|
||||
$depth = ((4000 - $tmpdirLength) / 57);
|
||||
}
|
||||
$depth = ((4000 - $tmpdirLength) / 57);
|
||||
|
||||
foreach (range(0, $depth - 1) as $i) {
|
||||
$longPath .= $ds . $folderName;
|
||||
$result = $rootView->mkdir($longPath);
|
||||
|
|
|
|||
Loading…
Reference in a new issue