[PR #17121] [CLOSED] Replace active fake files atomically #478

Closed
opened 2026-08-29 05:22:40 +03:00 by mirror-bot · 0 comments

📋 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)

  • b6c143d Replace 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

  • 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 added the pull-request label 2026-08-29 05:22:40 +03:00
mirror-bot changed title from [PR #17121] Replace active fake files atomically to [PR #17121] [CLOSED] Replace active fake files atomically 2026-08-29 21:22:12 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Utilities/zapret-discord-youtube#478