mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-06-09 15:52:37 -06:00
When a previous export crashes (OOM, abort, kill), the partially- downloaded temp export under .dce-temp/ was orphaned. Subsequent runs started the incremental from the archive's last message ID, re-downloading everything the failed run had already fetched. Now scrape_target() checks for orphaned temp exports before each channel export, salvages truncated JSON (same marker-based repair as salvage-truncated-export.sh), merges recovered messages into the archive, and cleans up stale temp dirs. The incremental then starts from the truly latest message. Adds salvage-stale smoke test with truncated fixture.
20 lines
391 B
JSON
20 lines
391 B
JSON
{
|
|
"guild": {
|
|
"id": "222",
|
|
"name": "Fixture Guild"
|
|
},
|
|
"channel": {
|
|
"id": "111",
|
|
"name": "fixture-room",
|
|
"category": "Testing Grounds"
|
|
},
|
|
"messages": [
|
|
{
|
|
"id": "3",
|
|
"timestamp": "2026-01-03T00:00:00Z",
|
|
"content": "third"
|
|
},
|
|
{
|
|
"id": "4",
|
|
"timestamp": "2026-01-04T00:00:00Z",
|
|
"content": "fourth - this message is trun |