Skip to content

Commit

Permalink
fix ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Apr 15, 2024
1 parent ea7ef17 commit edcea2a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/packager/src/package/deb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
collections::{BTreeSet, HashMap},
ffi::OsStr,
fs::File,
io::Write,
io::{BufReader, Write},
os::unix::fs::MetadataExt,
path::{Path, PathBuf},
};
Expand Down Expand Up @@ -58,7 +58,9 @@ fn generate_icon_files(config: &Config, data_dir: &Path) -> crate::Result<BTreeS
}
// Put file in scope so that it's closed when copying it
let deb_icon = {
let decoder = PngDecoder::new(File::open(&icon_path)?)?;
let file = File::open(&icon_path)?;
let file = BufReader::new(file);
let decoder = PngDecoder::new(file)?;
let width = decoder.dimensions().0;
let height = decoder.dimensions().1;
let is_high_density = util::is_retina(&icon_path);
Expand Down

0 comments on commit edcea2a

Please sign in to comment.