This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new ad35c015c Replaces Files.delete with Files.deleteIfExits
ad35c015c is described below
commit ad35c015ce52916f5d397fb3d92183cdf533488d
Author: Matthew de Detrich <[email protected]>
AuthorDate: Tue Jun 6 19:08:55 2023 +0200
Replaces Files.delete with Files.deleteIfExits
---
.../pekko/http/scaladsl/server/directives/FileUploadDirectives.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala
b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala
index 865a2027f..62ca8e355 100644
---
a/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala
+++
b/http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala
@@ -179,7 +179,7 @@ trait FileUploadDirectives {
val dest = Files.createTempFile("pekko-http-upload", ".tmp")
Runtime.getRuntime.addShutdownHook(new Thread() {
override def run(): Unit =
- Files.delete(dest)
+ Files.deleteIfExists(dest)
})
dest.toFile
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]