CLI interface to medialist (fossil mirror)
Révision | f2adb97e23af7db4a3c2da8eec76fb5e2eeb67be (tree) |
---|---|
l'heure | 2023-04-05 19:24:29 |
Auteur | mio <stigma@disr...> |
Commiter | mio |
Fix FileException being thrown on Windows.
FossilOrigin-Name: 1b88660040b7c876827fac984ecd4854d36a4f9a521e01f839ed251af3c02f4b
@@ -1468,7 +1468,11 @@ private void _ml_update(MediaList* list, string[] args) | ||
1468 | 1468 | |
1469 | 1469 | string tempFilePath = buildPath(tempDir, "ml_temp.tsv"); |
1470 | 1470 | File tempFile = File(tempFilePath, "w+"); |
1471 | - scope(exit) remove(tempFilePath); | |
1471 | + scope(exit) { | |
1472 | + // Windows requires the file to be closed before removing. | |
1473 | + tempFile.close(); | |
1474 | + remove(tempFilePath); | |
1475 | + } | |
1472 | 1476 | |
1473 | 1477 | size_t[2][6] headerPositions = _ml_get_header_positions(list); |
1474 | 1478 | size_t titleIndex = 0; |