Skip to content

Commit 409f95b

Browse files
committed
#3 needs rework
1 parent 14b9897 commit 409f95b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/main.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,22 @@ fn backup_mods(config: Config) -> Result<(), Box<dyn std::error::Error>> {
190190
Ok(())
191191
}
192192

193+
//ToDo this function needs more thinking before i can properly implement it.
194+
// Might need a rework of the backup system a little.
195+
#[allow(dead_code)]
196+
fn delete_old_backups(config: Config) -> Result<(), Box<dyn std::error::Error>> {
197+
if (!config.backup_subfolders) {
198+
return Ok(());
199+
}
200+
let folder = config.backup_path;
201+
let system_time = std::time::SystemTime::now();
202+
let datetime: DateTime<Local> = system_time.into();
203+
for folder in &folder {
204+
}
205+
206+
Ok(())
207+
}
208+
193209
fn copy_dir_all<P: AsRef<Path>, Q: AsRef<Path>>(
194210
from: P,
195211
to: Q,

0 commit comments

Comments
 (0)