mirror of
https://github.com/androidx/media.git
synced 2025-05-17 04:29:55 +08:00
Fix cache upgrade
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138687623
This commit is contained in:
parent
ee8a7f17ff
commit
aefc5165fd
@ -84,7 +84,12 @@ public class SimpleCacheSpanTest extends InstrumentationTestCase {
|
|||||||
File v1File = createTestFile("asd\u00aa.5.6.v1.exo");
|
File v1File = createTestFile("asd\u00aa.5.6.v1.exo");
|
||||||
|
|
||||||
for (File file : cacheDir.listFiles()) {
|
for (File file : cacheDir.listFiles()) {
|
||||||
SimpleCacheSpan.createCacheEntry(file, index);
|
SimpleCacheSpan cacheEntry = SimpleCacheSpan.createCacheEntry(file, index);
|
||||||
|
if (file.equals(wrongEscapedV2file)) {
|
||||||
|
assertNull(cacheEntry);
|
||||||
|
} else {
|
||||||
|
assertNotNull(cacheEntry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assertTrue(v3file.exists());
|
assertTrue(v3file.exists());
|
||||||
|
@ -67,6 +67,7 @@ import java.util.regex.Pattern;
|
|||||||
if (file == null) {
|
if (file == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
name = file.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
Matcher matcher = CACHE_FILE_PATTERN_V3.matcher(name);
|
Matcher matcher = CACHE_FILE_PATTERN_V3.matcher(name);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user