update comments

This commit is contained in:
Jay 2020-06-19 16:38:14 +01:00 committed by Abin Simon
parent 05c0888979
commit dc548c2d66
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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");