main: close ar file before moving it

Moving a file is not allowed on Windows when a program still has the
file open.
This commit is contained in:
Ayke van Laethem
2019-04-27 17:30:19 +02:00
committed by Ron Evans
parent 5b0b35f9e4
commit 5ca2e1322c
+1
View File
@@ -294,5 +294,6 @@ func compileBuiltins(target string, callback func(path string) error) error {
// Give the caller the resulting file. The callback must copy the file,
// because after it returns the temporary directory will be removed.
arfile.Close()
return callback(arpath)
}