fix: add original_path property to GameSaveLocation
This commit is contained in:
@@ -12,14 +12,19 @@ const XXHASH64_SEED: u64 = 1337;
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct GameSaveLocation {
|
||||
pub friendly_name: Option<String>,
|
||||
pub original_path: PathBuf,
|
||||
files: Vec<GameFile>,
|
||||
uuid: Uuid,
|
||||
}
|
||||
|
||||
impl GameSaveLocation {
|
||||
pub fn new(files: Vec<GameFile>, friendly_name: Option<String>) -> Self {
|
||||
pub fn new<P>(path: P, files: Vec<GameFile>, friendly_name: Option<String>) -> Self
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
Self {
|
||||
friendly_name,
|
||||
original_path: path.as_ref().to_path_buf(),
|
||||
files,
|
||||
uuid: Uuid::new_v4(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user