• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

CLI interface to medialist (fossil mirror)


Commit MetaInfo

Revisiónf2adb97e23af7db4a3c2da8eec76fb5e2eeb67be (tree)
Tiempo2023-04-05 19:24:29
Autormio <stigma@disr...>
Commitermio

Log Message

Fix FileException being thrown on Windows.

FossilOrigin-Name: 1b88660040b7c876827fac984ecd4854d36a4f9a521e01f839ed251af3c02f4b

Cambiar Resumen

Diferencia incremental

--- a/medialist.d
+++ b/medialist.d
@@ -1468,7 +1468,11 @@ private void _ml_update(MediaList* list, string[] args)
14681468
14691469 string tempFilePath = buildPath(tempDir, "ml_temp.tsv");
14701470 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+ }
14721476
14731477 size_t[2][6] headerPositions = _ml_get_header_positions(list);
14741478 size_t titleIndex = 0;