mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-29 06:02:26 +00:00
Changing imports for Component::CurDir
This commit is contained in:
parent
e971b395c8
commit
bf1eb22c01
@ -3,7 +3,7 @@
|
||||
use std::{
|
||||
env, fs,
|
||||
io::{self, prelude::*},
|
||||
path::Component::CurDir,
|
||||
path::Component,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
@ -48,7 +48,7 @@ where
|
||||
fs::create_dir_all(&path)?;
|
||||
}
|
||||
}
|
||||
let file_path = file_path.strip_prefix(CurDir).unwrap_or_else(|_| file_path.as_path());
|
||||
let file_path = file_path.strip_prefix(Component::CurDir).unwrap_or_else(|_| file_path.as_path());
|
||||
|
||||
info!("{:?} extracted. ({})", file_path.display(), Bytes::new(file.size()));
|
||||
|
||||
|
@ -2,7 +2,7 @@ use std::{
|
||||
cmp, env,
|
||||
ffi::OsStr,
|
||||
fs::{self, ReadDir},
|
||||
path::Component::CurDir,
|
||||
path::Component,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
@ -46,7 +46,7 @@ pub fn user_wants_to_overwrite(path: &Path, flags: &oof::Flags) -> crate::Result
|
||||
_ => {}
|
||||
}
|
||||
|
||||
let path = path.strip_prefix(CurDir).unwrap_or_else(|_| path);
|
||||
let path = path.strip_prefix(Component::CurDir).unwrap_or_else(|_| path);
|
||||
Confirmation::new("Do you want to overwrite 'FILE'?", Some("FILE")).ask(Some(&to_utf(path)))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user