src/Pure/General/mailman.scala
changeset 78958 c125f75a5144
parent 77369 df17355f1e2c
child 79044 8cc1ae43e12e
--- a/src/Pure/General/mailman.scala	Sun Nov 12 12:33:22 2023 +0100
+++ b/src/Pure/General/mailman.scala	Sun Nov 12 12:34:04 2023 +0100
@@ -376,15 +376,14 @@
       try {
         val length = connection.getContentLengthLong
         val timestamp = connection.getLastModified
-        val file = path.file
-        if (file.isFile && file.length == length && file.lastModified == timestamp) None
+        if (path.is_file && File.size(path) == length && path.file.lastModified == timestamp) None
         else {
           Isabelle_System.make_directory(path.dir)
           progress.echo("Getting " + url)
           val bytes =
             using(connection.getInputStream)(Bytes.read_stream(_, hint = length.toInt max 1024))
-          Bytes.write(file, bytes)
-          file.setLastModified(timestamp)
+          Bytes.write(path, bytes)
+          path.file.setLastModified(timestamp)
           Some(path)
         }
       }