mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
fix(deps): bump zip to 4.6.1 with backup API fix (#920)
Complete the Dependabot #910 bump: update Cargo.toml and migrate backup archive writes to SimpleFileOptions (zip 4.x API). Fixes lockfile drift where cargo downgraded zip back to 0.6.6 on every dev build.
This commit is contained in:
@@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};
|
||||
use rusqlite::{Connection, OpenFlags};
|
||||
use serde_json::Value;
|
||||
use tauri::{AppHandle, Manager};
|
||||
use zip::write::FileOptions;
|
||||
use zip::write::SimpleFileOptions;
|
||||
use zip::{CompressionMethod, ZipArchive, ZipWriter};
|
||||
|
||||
const LIBRARY_ARCHIVE_ENTRY: &str = "library.sqlite";
|
||||
@@ -212,7 +212,8 @@ fn write_databases_archive(
|
||||
) -> Result<(), String> {
|
||||
let file = fs::File::create(destination_archive).map_err(|e| e.to_string())?;
|
||||
let mut zip = ZipWriter::new(file);
|
||||
let options = FileOptions::default().compression_method(CompressionMethod::Deflated);
|
||||
let options =
|
||||
SimpleFileOptions::default().compression_method(CompressionMethod::Deflated);
|
||||
zip.start_file(LIBRARY_ARCHIVE_ENTRY, options)
|
||||
.map_err(|e| e.to_string())?;
|
||||
let mut src = fs::File::open(library_snapshot).map_err(|e| e.to_string())?;
|
||||
@@ -233,7 +234,8 @@ fn write_full_archive(
|
||||
) -> Result<(), String> {
|
||||
let file = fs::File::create(destination_archive).map_err(|e| e.to_string())?;
|
||||
let mut zip = ZipWriter::new(file);
|
||||
let options = FileOptions::default().compression_method(CompressionMethod::Deflated);
|
||||
let options =
|
||||
SimpleFileOptions::default().compression_method(CompressionMethod::Deflated);
|
||||
|
||||
zip.start_file(FULL_ARCHIVE_SETTINGS_ENTRY, options)
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
Reference in New Issue
Block a user