From e6b9b927f4bbcd5833ec5b0c07a2a5ee52991875 Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Thu, 4 May 2023 19:04:18 +0100 Subject: [PATCH] handle ISOs --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.rs b/src/main.rs index 5421968..471bba9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -65,6 +65,14 @@ fn handle_image(file: DirEntry) { move_file(file.path(), pictures_dir()); } +fn handle_iso(file: DirEntry) { + let mut dir = home_dir(); + + dir.push("ISOs"); + + move_file(file.path(), dir); +} + fn handle_gif(file: DirEntry) { let mut dir = pictures_dir(); @@ -173,6 +181,7 @@ fn handle_dir(path: PathBuf) { "jpg" => { handle_image(inode) } "jpeg" => { handle_image(inode) } "png" => { handle_image(inode) } + "iso" => { handle_iso( inode) } "mp3" => { handle_mp3( inode) } "pdf" => { handle_pdf( inode) } "avi" => { handle_video(inode) }