mdedetrich commented on issue #175: URL: https://github.com/apache/incubator-pekko-http/issues/175#issuecomment-1580940930
Isn't the idea of adding the shutdown hook to take care of the scenario where the process gets interrupted/cancelled after the temp file is created and before https://github.com/apache/incubator-pekko-http/blob/20c3fea9d950d14157438918b8ba8e7747505f71/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala#L192 is executed? Also note that I was replicating the current behaviour, the previous `deleteOnExit()` also adds a shutdown hook, it just doesn't happen to exist on `java.nio.file.Path`. I guess we can get rid of the explicit shutdown hook and just do `dest.toFile.deleteOnExit()` so that its exactly the same as old behaviour (I would just presume that `java.nio.Files.deleteIfExists` is faster) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
