src/Pure/General/zstd.scala
changeset 76529 ded37aade88e
parent 76353 3698d0f3da18
child 77570 98b4a9902582
--- a/src/Pure/General/zstd.scala	Fri Nov 25 10:57:38 2022 +0100
+++ b/src/Pure/General/zstd.scala	Fri Nov 25 13:38:15 2022 +0100
@@ -18,12 +18,9 @@
       "Zstd library already initialized by other means than isabelle.Zstd.init()")
 
     val lib_dir = Path.explode("$ISABELLE_ZSTD_HOME/" + Platform.jvm_platform)
-    val lib_file =
-      File.find_files(lib_dir.file) match {
-        case List(file) => file
-        case _ => error("Exactly one file expected in directory " + lib_dir.expand)
-      }
-    System.load(File.platform_path(lib_file.getAbsolutePath))
+    val lib_file = File.get_file(lib_dir)
+
+    System.load(lib_file.absolute_file.getPath)
 
     zstd.util.Native.assumeLoaded()
     assert(zstd.util.Native.isLoaded())