Skip to content

Commit

Permalink
cxx-qt-build: move the check for reaching the end of the file
Browse files Browse the repository at this point in the history
  • Loading branch information
jnbooth committed Dec 21, 2024
1 parent 5e6cbdf commit be13cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/cxx-qt-build/src/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ fn files_conflict(source: &Path, dest: &Path) -> Result<bool> {
loop {
let source_bytes = source.fill_buf()?;
let bytes_len = source_bytes.len();
let dest_bytes = dest.fill_buf()?;
let bytes_len = bytes_len.min(dest_bytes.len());
if bytes_len == 0 {
return Ok(false);
}
let dest_bytes = dest.fill_buf()?;
let bytes_len = bytes_len.min(dest_bytes.len());
if source_bytes[..bytes_len] != dest_bytes[..bytes_len] {
return Ok(true);
}
Expand Down

0 comments on commit be13cbc

Please sign in to comment.