diff --git a/mkdocs/structure/files.py b/mkdocs/structure/files.py
index 80aa8c3d..ada0c95a 100644
--- a/mkdocs/structure/files.py
+++ b/mkdocs/structure/files.py
@@ -243,8 +243,8 @@ def get_files(config):
             if _filter_paths(basename=filename, path=path, is_dir=False, exclude=exclude):
                 continue
             # Skip README.md if an index file also exists in dir
-            if filename.lower() == 'readme.md' and 'index.md' in filenames:
-                log.warning(f"Both index.md and readme.md found. Skipping readme.md from {source_dir}")
+            if filename == 'README.md' and 'index.md' in filenames:
+                log.warning(f"Both index.md and README.md found. Skipping README.md from {source_dir}")
                 continue
             files.append(File(path, config['docs_dir'], config['site_dir'], config['use_directory_urls']))
 

diff --git a/mkdocs/tests/structure/file_tests.py b/mkdocs/tests/structure/file_tests.py
index 6ecc2587..d3d3cfad 100644
--- a/mkdocs/tests/structure/file_tests.py
+++ b/mkdocs/tests/structure/file_tests.py
@@ -592,6 +592,7 @@ class TestFiles(PathAssertionMixin, unittest.TestCase):
 
     @tempdir(files=[
         'index.md',
+        'readme.md',
         'bar.css',
         'bar.html',
         'bar.jpg',
@@ -603,7 +604,7 @@ class TestFiles(PathAssertionMixin, unittest.TestCase):
     def test_get_files(self, tdir):
         config = load_config(docs_dir=tdir, extra_css=['bar.css'], extra_javascript=['bar.js'])
         files = get_files(config)
-        expected = ['index.md', 'bar.css', 'bar.html', 'bar.jpg', 'bar.js', 'bar.md']
+        expected = ['index.md', 'bar.css', 'bar.html', 'bar.jpg', 'bar.js', 'bar.md', 'readme.md']
         self.assertIsInstance(files, Files)
         self.assertEqual(len(files), len(expected))
         self.assertEqual([f.src_path for f in files], expected)

What is the expected behavior of `readme.md`?
According to the docs, [Writing-your-docs:Index-pages](https://www.mkdocs.org/user-guide/writing-your-docs/#index-pages), `README.md` will render into `index.html`. There is no mention of `readme.md`. The implementation reflects this behavior: https://github.com/mkdocs/mkdocs/blob/dc35569ade5e101c8c48b78bbed8708dd0b1b49a/mkdocs/structure/files.py#L151

But the check in [get_files()](https://github.com/mkdocs/mkdocs/blob/dc35569ade5e101c8c48b78bbed8708dd0b1b49a/mkdocs/structure/files.py#L225) ignores casing:
https://github.com/mkdocs/mkdocs/blob/dc35569ade5e101c8c48b78bbed8708dd0b1b49a/mkdocs/structure/files.py#L246-L247

I believe it should be:
```python
if filename == 'README.md' and 'index.md' in filenames:
```
mkdocs/tests/structure/file_tests.py::TestFiles::test_get_files
mkdocs/tests/structure/file_tests.py::TestFiles::test_add_files_from_theme mkdocs/tests/structure/file_tests.py::TestFiles::test_copy_file mkdocs/tests/structure/file_tests.py::TestFiles::test_copy_file_clean_modified mkdocs/tests/structure/file_tests.py::TestFiles::test_copy_file_dirty_modified mkdocs/tests/structure/file_tests.py::TestFiles::test_copy_file_dirty_not_modified mkdocs/tests/structure/file_tests.py::TestFiles::test_css_file mkdocs/tests/structure/file_tests.py::TestFiles::test_css_file_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_file_eq mkdocs/tests/structure/file_tests.py::TestFiles::test_file_name_with_space mkdocs/tests/structure/file_tests.py::TestFiles::test_file_ne mkdocs/tests/structure/file_tests.py::TestFiles::test_files mkdocs/tests/structure/file_tests.py::TestFiles::test_files_append_remove_src_paths mkdocs/tests/structure/file_tests.py::TestFiles::test_filter_paths mkdocs/tests/structure/file_tests.py::TestFiles::test_get_files_exclude_readme_with_index mkdocs/tests/structure/file_tests.py::TestFiles::test_get_files_include_readme_without_index mkdocs/tests/structure/file_tests.py::TestFiles::test_get_relative_url mkdocs/tests/structure/file_tests.py::TestFiles::test_get_relative_url_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_javascript_file mkdocs/tests/structure/file_tests.py::TestFiles::test_javascript_file_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_md_file mkdocs/tests/structure/file_tests.py::TestFiles::test_md_file_nested mkdocs/tests/structure/file_tests.py::TestFiles::test_md_file_nested_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_md_file_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_md_index_file mkdocs/tests/structure/file_tests.py::TestFiles::test_md_index_file_nested mkdocs/tests/structure/file_tests.py::TestFiles::test_md_index_file_nested_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_md_index_file_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_md_readme_index_file mkdocs/tests/structure/file_tests.py::TestFiles::test_md_readme_index_file_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_media_file mkdocs/tests/structure/file_tests.py::TestFiles::test_media_file_use_directory_urls mkdocs/tests/structure/file_tests.py::TestFiles::test_sort_files mkdocs/tests/structure/file_tests.py::TestFiles::test_static_file mkdocs/tests/structure/file_tests.py::TestFiles::test_static_file_use_directory_urls