Skip to content

Commit

Permalink
Issue #11944 - Part.delete() should only attempt to delete if the fil…
Browse files Browse the repository at this point in the history
…e exists.
  • Loading branch information
joakime committed Jun 21, 2024
1 parent b15cfd1 commit 9f077aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void delete() throws IOException
Path path = getPath();
if (path != null)
{
Files.delete(path);
Files.deleteIfExists(path);
try (AutoLock ignored = lock.lock())
{
this.path = null;
Expand Down Expand Up @@ -338,7 +338,7 @@ public void fail(Throwable t)
if (source != null)
source.fail(t);
if (path != null)
Files.delete(path);
Files.deleteIfExists(path);
}
catch (Throwable x)
{
Expand Down

0 comments on commit 9f077aa

Please sign in to comment.