File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,7 @@ use crate::SystemCommands;
55use crate :: RunCommands ;
66use std:: io:: { self , BufRead } ;
77use std:: fs:: { self , File } ;
8- use std:: path:: Path ;
9- use std:: process:: { Command , Stdio } ;
108use chrono:: { DateTime , Utc , Duration as ChronoDuration } ;
11- use std:: env;
129
1310pub fn handle_unpack ( unpack_command : UnpackCommands ) {
1411 match unpack_command {
@@ -210,9 +207,9 @@ pub fn handle_back() {
210207 let snapshot_dir = "/var/cache/hacker/" ;
211208 // Find latest current- snapshot
212209 let mut snapshots: Vec < _ > = fs:: read_dir ( snapshot_dir) . unwrap ( )
213- . filter_map ( |e| e. ok ( ) )
214- . filter ( |e| e. file_name ( ) . to_string_lossy ( ) . starts_with ( "current-" ) )
215- . collect ( ) ;
210+ . filter_map ( |e| e. ok ( ) )
211+ . filter ( |e| e. file_name ( ) . to_string_lossy ( ) . starts_with ( "current-" ) )
212+ . collect ( ) ;
216213 snapshots. sort_by_key ( |e| e. metadata ( ) . unwrap ( ) . modified ( ) . unwrap ( ) ) ;
217214 if let Some ( latest) = snapshots. last ( ) {
218215 let path = latest. path ( ) . to_string_lossy ( ) . to_string ( ) ;
You can’t perform that action at this time.
0 commit comments