Skip to content

Commit 968f30d

Browse files
committed
[asio-sys] Use case-insensitive comparison for discovering downloaded asio sdk
This fixed the build of asio-sys on my windows machine. I thought all windows filesystems were case-insensitive but apparently not.
1 parent 5d57176 commit 968f30d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

asio-sys/build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,13 @@ fn get_asio_dir() -> PathBuf {
290290
// Move the contents of the inner directory to asio_dir
291291
for entry in walkdir::WalkDir::new(&temp_dir).min_depth(1).max_depth(1) {
292292
let entry = entry.unwrap();
293-
if entry.file_type().is_dir() && entry.file_name().to_string_lossy().starts_with("asio") {
293+
if entry.file_type().is_dir()
294+
&& entry
295+
.file_name()
296+
.to_string_lossy()
297+
.to_lowercase()
298+
.starts_with("asio")
299+
{
294300
std::fs::rename(entry.path(), &asio_dir).expect("Failed to rename directory");
295301
break;
296302
}

0 commit comments

Comments
 (0)