Skip to content

Commit 842df49

Browse files
Merge pull request #56816 from nextcloud/jtr/chore-legacy-drop-mac-checker
2 parents 594d220 + 511f543 commit 842df49

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

lib/private/Setup.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,11 @@ public function getSystemInfo(bool $allowAllDatabases = false): array {
185185
}
186186
}
187187

188-
if (\OC_Util::runningOnMac()) {
188+
// Check if running directly on macOS (note: Linux containers on macOS will not trigger this)
189+
if (PHP_OS_FAMILY === 'Darwin') {
189190
$errors[] = [
190191
'error' => $this->l10n->t(
191-
'Mac OS X is not supported and %s will not work properly on this platform. '
192+
'macOS is not supported and %s will not work properly on this platform. '
192193
. 'Use it at your own risk!',
193194
[$this->defaults->getProductName()]
194195
),

lib/private/legacy/OC_Util.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -732,15 +732,6 @@ public static function obEnd() {
732732
}
733733
}
734734

735-
/**
736-
* Checks whether the server is running on Mac OS X
737-
*
738-
* @return bool true if running on Mac OS X, false otherwise
739-
*/
740-
public static function runningOnMac() {
741-
return (strtoupper(substr(PHP_OS, 0, 6)) === 'DARWIN');
742-
}
743-
744735
/**
745736
* Handles the case that there may not be a theme, then check if a "default"
746737
* theme exists and take that one

tests/lib/Files/ViewTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -805,15 +805,11 @@ public function xtestLongPath() {
805805
$ds = DIRECTORY_SEPARATOR;
806806
/*
807807
* 4096 is the maximum path length in file_cache.path in *nix
808-
* 1024 is the max path length in mac
809808
*/
810809
$folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789';
811810
$tmpdirLength = strlen(Server::get(ITempManager::class)->getTemporaryFolder());
812-
if (\OC_Util::runningOnMac()) {
813-
$depth = ((1024 - $tmpdirLength) / 57);
814-
} else {
815-
$depth = ((4000 - $tmpdirLength) / 57);
816-
}
811+
$depth = ((4000 - $tmpdirLength) / 57);
812+
817813
foreach (range(0, $depth - 1) as $i) {
818814
$longPath .= $ds . $folderName;
819815
$result = $rootView->mkdir($longPath);

0 commit comments

Comments
 (0)