Skip to content

Commit

Permalink
rdmd: Clean up the temporary executable file if the build fails
Browse files Browse the repository at this point in the history
OPTLINK may leave behind a broken executable, although the build failed.
Depending on user options, this .tmp file may reside outside the
rdmd work directory, so clean it up if it is created.
  • Loading branch information
CyberShadow committed Jan 27, 2014
1 parent 3a4b295 commit 2ac7c99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rdmd.d
Expand Up @@ -456,6 +456,8 @@ private int rebuild(string root, string fullExe,
if (result)
{
// build failed
if (exists(fullExeTemp))
remove(fullExeTemp);
return result;
}
// clean up the dir containing the object file, just not in dry
Expand Down

0 comments on commit 2ac7c99

Please sign in to comment.