File tree Expand file tree Collapse file tree 3 files changed +5
-17
lines changed
Expand file tree Collapse file tree 3 files changed +5
-17
lines changed Original file line number Diff line number Diff 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 ),
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 );
You can’t perform that action at this time.
0 commit comments