simplify cache file retrieval
All checks were successful
Publish to snapshot maven / build (push) Successful in 43s

This commit is contained in:
moehreag 2024-05-20 16:24:27 +02:00
parent 8c05c42321
commit 0afabf7835

View file

@ -40,7 +40,7 @@ object CachingHttpClient {
private fun getCacheFile(uri: URI): Path { private fun getCacheFile(uri: URI): Path {
val path = NonsenseGradlePlugin.nonsenseCacheDir.resolve("httpCache") val path = NonsenseGradlePlugin.nonsenseCacheDir.resolve("httpCache")
.resolve(uri.toString().substring(uri.scheme.length + 3)) .resolve(uri.host).resolve(uri.rawPath) // Use rawPath to ensure ASCII compat (since this will be a filesystem dir)
path.createParentDirectories() path.createParentDirectories()
return path return path
} }