You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
897 B
19 lines
897 B
//! Handles restoration
|
|
//!
|
|
//! # Handling paths
|
|
//! For single files, restoration is trivial.
|
|
//!
|
|
//! ## Directories
|
|
//! In restoration, directories are restored recursively. All deleted children of a directory path are restored in this operation.
|
|
//!
|
|
//! # Process
|
|
//! When determining if the recursive (directory) stratergy is needed, this happens
|
|
//! * If the path does not exist in the database as its own atom
|
|
//! * If there are one or more atoms prefixed with this exact path
|
|
//!
|
|
//! Then we use the directory stratergy
|
|
//! ## Issues
|
|
//! This can cause issues if a file is deleted and replaced with a directory which is then deleted. The file will be recovered before the directory.
|
|
//! This is a bug or design flaw. (Maybe we can mitigate this with a flag to prefer the directory stratergy, or check timestamps to determine if the file or the directory was the newest one.)
|
|
use super::*;
|