Skip to content
Snippets Groups Projects
Commit c4c5f9ea authored by brinn's avatar brinn
Browse files

Avoid an exception when a race condition happens when recursively deleting a directory.

SVN: 27074
parent 8d25c440
No related branches found
No related tags found
No related merge requests found
......@@ -926,7 +926,18 @@ public final class FileUtilities
{
if (path.canWrite() == false && Unix.isOperational())
{
Unix.setAccessMode(path.getPath(), (short) 0777);
try
{
Unix.setAccessMode(path.getPath(), (short) 0777);
} catch (IOExceptionUnchecked ex)
{
if (ex.getCause() != null
&& ex.getCause().getMessage().contains("No such file or directory"))
{
return false;
}
}
}
return path.canWrite();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment