Commit f6867bb7 authored by Ben Boeckel's avatar Ben Boeckel Committed by Brad King
Browse files

SystemTools: flip junction deletion around

If the path is a junction, pass if the junction was successfully
deleted. Not doing so triggers an INVALID_FILE_HANDLE error when
DeleteFileW is called later, not that the path doesn't exist.

Change-Id: I8957a0ca0704f7f950faeac90b15e8c61c5f5a90
parent b51abb30
......@@ -2884,9 +2884,9 @@ bool SystemTools::RemoveFile(const std::string& source)
SetLastError(err);
return false;
}
if (IsJunction(ws) && !DeleteJunction(ws))
if (IsJunction(ws) && DeleteJunction(ws))
{
return false;
return true;
}
if (DeleteFileW(ws.c_str()) ||
GetLastError() == ERROR_FILE_NOT_FOUND ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment