Skip to content

Commit

Permalink
Check if temporary file exists before to try to remove it. This suppr…
Browse files Browse the repository at this point in the history
…ess useless warning when application stops
  • Loading branch information
To-om committed Nov 20, 2017
1 parent 877a2eb commit 951e63e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/org/elastic4play/services/TempSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class TempSrv @Inject() (
}
}
private[TempSrv] def delete(directory: Path): Unit = try {
Files.walkFileTree(directory, deleteVisitor)
if (Files.exists(directory))
Files.walkFileTree(directory, deleteVisitor)
()
}
catch {
Expand Down

0 comments on commit 951e63e

Please sign in to comment.