Skip to content

Commit

Permalink
g3keymess: allow to use symbolink key files
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-jq-b committed Feb 24, 2025
1 parent b2d4fd4 commit 1ed49d7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions g3keymess/src/config/store/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ impl KeyStoreConfig for LocalKeyStoreConfig {
.await
.map_err(|e| anyhow!("failed to read dir {}: {e}", self.dir_path.display()))?
{
let ft = entry.file_type().await.map_err(|e| {
anyhow!("failed to get file type of {}: {e}", entry.path().display())
// symlink is followed in `metadata()`
let meta = entry.metadata().await.map_err(|e| {
anyhow!(
"failed to fetch metadata for file {}: {e}",
entry.path().display()
)
})?;
if !ft.is_file() {
if !meta.is_file() {
continue;
}

Expand Down

0 comments on commit 1ed49d7

Please sign in to comment.