diff --git a/gitbutler-app/src/project_repository/conflicts.rs b/gitbutler-app/src/project_repository/conflicts.rs index a8f0a0007..8b283b7ed 100644 --- a/gitbutler-app/src/project_repository/conflicts.rs +++ b/gitbutler-app/src/project_repository/conflicts.rs @@ -21,8 +21,8 @@ pub fn mark(repository: &Repository, paths: &[String], parent: Option) // write all the file paths to a file on disk let mut file = std::fs::File::create(conflicts_path)?; for path in paths { - file.write_all(path.as_bytes()).unwrap(); - file.write_all(b"\n").unwrap(); + file.write_all(path.as_ref().as_os_str().as_encoded_bytes())?; + file.write_all(b"\n")?; } if let Some(parent) = parent { @@ -85,7 +85,7 @@ pub fn conflicting_files(repository: &Repository) -> Result> { Ok(reader.lines().map_while(Result::ok).collect()) } -pub fn is_conflicting(repository: &Repository, path: Option<&str>) -> Result { +pub fn is_conflicting>(repository: &Repository, path: Option

) -> Result { let conflicts_path = repository.git_repository.path().join("conflicts"); if !conflicts_path.exists() { return Ok(false); @@ -103,7 +103,7 @@ pub fn is_conflicting(repository: &Repository, path: Option<&str>) -> Result