mirror of
https://github.com/lsd-rs/lsd
synced 2024-11-13 23:57:08 +00:00
update comments
This commit is contained in:
parent
05c0888979
commit
dc548c2d66
2 changed files with 2 additions and 2 deletions
|
@ -187,8 +187,8 @@ impl Meta {
|
|||
}
|
||||
|
||||
pub fn from_path(path: &Path) -> Result<Self, std::io::Error> {
|
||||
// If the file is a link then retrieve link metadata instead with target metadata (if present).
|
||||
let (metadata, symlink_meta) = if read_link(path).is_ok() {
|
||||
// If the file is a link, retrieve link metadata and target meta (if exists).
|
||||
(path.symlink_metadata()?, path.metadata().ok())
|
||||
} else {
|
||||
(path.metadata()?, None)
|
||||
|
|
|
@ -232,7 +232,7 @@ mod test {
|
|||
let tmp_dir = tempdir().expect("failed to create temp dir");
|
||||
let icons = Icons::new(icon::Theme::Fancy);
|
||||
|
||||
// Create the file;
|
||||
// Create the directory;
|
||||
let dir_path = tmp_dir.path().join("tmp.d");
|
||||
std::fs::create_dir(&dir_path).expect("failed to create dir");
|
||||
|
||||
|
|
Loading…
Reference in a new issue