mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
fix snapshot temp file
This commit is contained in:
parent
759f6b48ee
commit
ea681026f7
@ -6,7 +6,7 @@ use log::error;
|
||||
use std::fs::create_dir_all;
|
||||
use std::path::Path;
|
||||
use std::thread;
|
||||
use std::time::{Duration};
|
||||
use std::time::Duration;
|
||||
use tempfile::TempDir;
|
||||
|
||||
pub fn load_snapshot(
|
||||
@ -29,7 +29,7 @@ pub fn load_snapshot(
|
||||
}
|
||||
|
||||
pub fn create_snapshot(data: &Data, snapshot_path: &Path) -> Result<(), Error> {
|
||||
let tmp_dir = TempDir::new()?;
|
||||
let tmp_dir = TempDir::new_in(snapshot_path)?;
|
||||
|
||||
data.db.copy_and_compact_to_path(tmp_dir.path())?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user