// Copyright 2025 Umberto Gotti <umberto.gotti@umbertogotti.dev>
// Licensed under the MIT License
// SPDX-License-Identifier: MIT
use std::path::Path;
pub fn normalize_path(path: &Path) -> String {
let normalized = path
.canonicalize()
.unwrap_or_else(|_| path.to_path_buf())
.to_string_lossy()
.replace('\\', "/");
if cfg!(windows) {
normalized.to_lowercase()
} else {
normalized
}
}