Replace active fake files through a same-directory temporary file with hash verification and a backup of the previous active file.
Motivation
The previous delete-then-copy sequence could leave ACTIVE_*.bin missing when the copy failed.
Changes
copy to a unique temporary file;
reject empty or hash-mismatched copies;
atomically replace the active file;
retain the previous file as .backup;
clean up temporary files after failures.
Validated locally with successful replacement and failed-copy preservation tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/Flowseal/zapret-discord-youtube/pull/17121
**Author:** [@anntr1k3](https://github.com/anntr1k3)
**Created:** 8/28/2026
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/atomic-fake-replacement`
---
### 📝 Commits (1)
- [`b6c143d`](https://github.com/Flowseal/zapret-discord-youtube/commit/b6c143d08712ea993ffd0d4f8c03cf861decd801) Replace active fake files atomically
### 📊 Changes
**1 file changed** (+5 additions, -3 deletions)
<details>
<summary>View changed files</summary>
📝 `service.bat` (+5 -3)
</details>
### 📄 Description
## Summary
Replace active fake files through a same-directory temporary file with hash verification and a backup of the previous active file.
## Motivation
The previous delete-then-copy sequence could leave ACTIVE_*.bin missing when the copy failed.
## Changes
- copy to a unique temporary file;
- reject empty or hash-mismatched copies;
- atomically replace the active file;
- retain the previous file as .backup;
- clean up temporary files after failures.
Validated locally with successful replacement and failed-copy preservation tests.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror-bot
changed title from [PR #17121] Replace active fake files atomically to [PR #17121] [CLOSED] Replace active fake files atomically2026-08-29 21:22:12 +03:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/Flowseal/zapret-discord-youtube/pull/17121
Author: @anntr1k3
Created: 8/28/2026
Status: ❌ Closed
Base:
main← Head:fix/atomic-fake-replacement📝 Commits (1)
b6c143dReplace active fake files atomically📊 Changes
1 file changed (+5 additions, -3 deletions)
View changed files
📝
service.bat(+5 -3)📄 Description
Summary
Replace active fake files through a same-directory temporary file with hash verification and a backup of the previous active file.
Motivation
The previous delete-then-copy sequence could leave ACTIVE_*.bin missing when the copy failed.
Changes
Validated locally with successful replacement and failed-copy preservation tests.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
[PR #17121] Replace active fake files atomicallyto [PR #17121] [CLOSED] Replace active fake files atomically