mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 01:13:30 -05:00
fix: keep the cache usable when a path is both
This commit is contained in:
1 parent
1ac569b98e
commit
5330ed1950
5 files changed
+33
-13
No files matched your search
@@ -309,6 +309,17 @@ class TestCache(unittest.TestCase):
|
||||
self.assertEqual([p.name for p in siblings], ["f.txt"])
|
||||
|
||||
|
||||
class TestCacheCollision(unittest.TestCase):
|
||||
def test_a_file_where_a_directory_is_needed_skips_the_write(self):
|
||||
# A profile citing both a directory and files inside it caches the
|
||||
# directory as a file first; that must not break the files.
|
||||
with tempfile.TemporaryDirectory() as root:
|
||||
base = Path(root)
|
||||
(base / "C64DTV").write_text("", encoding="utf-8")
|
||||
upstream.write_cache(base / "C64DTV" / "basic.bin", "data")
|
||||
self.assertTrue((base / "C64DTV").is_file())
|
||||
|
||||
|
||||
class TestRevisions(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.tmp = tempfile.TemporaryDirectory()
|
||||
|
||||
Reference in new issue
Block a user