diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 0ff5d010c0d..e7ce3ee9526 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -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 (PHP_OS_FAMILY === 'Darwin') { // macOS - $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);