Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidanthoff committed Aug 19, 2024
1 parent b429134 commit ca4c600
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/bin/juliainstaller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,16 +394,16 @@ pub fn main() -> Result<()> {

let paths = find_shell_scripts_to_be_modified(false)?;

let failed_paths: Vec<PathBuf> = [];
let mut failed_paths: Vec<PathBuf> = Vec::<PathBuf>::new();

for cur_path in paths {
let mut file_result = std::fs::OpenOptions::new()
let file_result = std::fs::OpenOptions::new()
.read(true)
.write(true)
.open(cur_path);
.open(&cur_path);

if file_result.is_err() {
failed_paths.push(cur_path);
failed_paths.push(cur_path.clone());
}
}

Expand All @@ -413,7 +413,7 @@ pub fn main() -> Result<()> {
println!("this is caused by incorrect permissions on these files. The");
println!("following files could not be edited:");
for cur_path in failed_paths {
println(" {}", cur_path.display());
println!(" {}", cur_path.display());
}
println!("You can find more help with this problem at");
println!(
Expand Down

0 comments on commit ca4c600

Please sign in to comment.