Skip to content

Commit

Permalink
Allow symlinked manpages
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Sep 20, 2024
1 parent 03d0f69 commit 90636b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ impl AssetSource {
Cow::Owned(data)
},
AssetSource::Data(d) => Cow::Borrowed(d),
AssetSource::Symlink(_) => return Err(CargoDebError::Str("Symlink unexpectedly used to read file data")),
AssetSource::Symlink(p) => {
let data = read_file_to_bytes(p)
.map_err(|e| CargoDebError::IoFile("Symlink unexpectedly used to read file data", e, p.clone()))?;
Cow::Owned(data)
},
})
}
}
Expand Down

0 comments on commit 90636b8

Please sign in to comment.