[PR #773] [CLOSED] refactor(backup): replace system zip/unzip with pure Rust implementation #780

Closed
opened 2026-03-02 03:41:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/codexu/note-gen/pull/773
Author: @NitronPlus
Created: 11/13/2025
Status: Closed

Base: devHead: zip-crate


📝 Commits (3)

  • 6d7ce44 refactor(backup): replace system zip/unzip with pure Rust implementation
  • a9f5685 unit test for the zip/unzip function
  • 9a3ede0 handle file permission for unix

📊 Changes

2 files changed (+511 additions, -83 deletions)

View changed files

📝 src-tauri/Cargo.toml (+5 -0)
📝 src-tauri/src/backup.rs (+506 -83)

📄 Description

Replace system-dependent zip/unzip commands with the zip crate for cross-platform compatibility and better error handling.

Fix two bugs when restore backup files, see #771

I also write five unit test in backup.rs, it will import tempfile crates in dev-dependencies. And use walkdir crate to rewrite copy_dir_recursive function .If you prefer the previous version , I will change it and file a new PR

Adding zip and walkdir crates will increase the final binary size by approximately 1MB on Windows


🔄 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/codexu/note-gen/pull/773 **Author:** [@NitronPlus](https://github.com/NitronPlus) **Created:** 11/13/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `zip-crate` --- ### 📝 Commits (3) - [`6d7ce44`](https://github.com/codexu/note-gen/commit/6d7ce44586fa1be20e830802be41f04699ee5950) refactor(backup): replace system zip/unzip with pure Rust implementation - [`a9f5685`](https://github.com/codexu/note-gen/commit/a9f5685a6d450a47637fb4893ead5a2f320ac844) unit test for the zip/unzip function - [`9a3ede0`](https://github.com/codexu/note-gen/commit/9a3ede0ad2d5e9f0517466afc3bbd6712a4daa6f) handle file permission for unix ### 📊 Changes **2 files changed** (+511 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/Cargo.toml` (+5 -0) 📝 `src-tauri/src/backup.rs` (+506 -83) </details> ### 📄 Description Replace system-dependent zip/unzip commands with the zip crate for cross-platform compatibility and better error handling. Fix two bugs when restore backup files, see #771 I also write five unit test in backup.rs, it will import tempfile crates in dev-dependencies. And use walkdir crate to rewrite copy_dir_recursive function .If you prefer the previous version , I will change it and file a new PR Adding zip and walkdir crates will increase the final binary size by approximately 1MB on Windows --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 03:41:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/note-gen#780
No description provided.