Media: Reverts get_attached_file() changes for normalized Windows paths.

Based on feedback from network storage configurations there was a noticed slowdown due to the usage of the `path_join()` function. This needs more time to find a workaround.

Follow-up to [53934].
Props mreishus, SergeyBiryukov, desrosj, mikeschroder.
Reverts [53934].
See #56924.


git-svn-id: https://develop.svn.wordpress.org/trunk@54712 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Anthony Burchell
2022-10-28 15:16:29 +00:00
parent 143f9464c2
commit 874aa24b4e
4 changed files with 2 additions and 87 deletions

View File

@@ -105,13 +105,6 @@ class Tests_Functions extends WP_UnitTestCase {
'C:\\',
'C:\\WINDOWS',
'\\\\sambashare\\foo',
'c:/',
'c://',
'//',
'c:/FOO',
'//FOO',
'C:/WWW/Sites/demo/htdocs/wordpress/wp-content/uploads/2016/03/example.jpg',
'//ComputerName/ShareName/SubfolderName/example.txt',
);
foreach ( $absolute_paths as $path ) {
$this->assertTrue( path_is_absolute( $path ), "path_is_absolute('$path') should return true" );
@@ -126,14 +119,10 @@ class Tests_Functions extends WP_UnitTestCase {
'../foo',
'../',
'../foo.bar',
'foo.bar',
'foo/bar',
'foo',
'FOO',
'..\\WINDOWS',
'..//WINDOWS',
'c:',
'C:',
);
foreach ( $relative_paths as $path ) {
$this->assertFalse( path_is_absolute( $path ), "path_is_absolute('$path') should return false" );