1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2024-12-12 19:18:24 +02:00

Fix Windows compilation error.

This commit is contained in:
Andrew Gallant 2016-09-25 19:57:31 -04:00
parent 9395076468
commit a72467996b

View File

@ -114,5 +114,5 @@ pub fn is_file_name<P: AsRef<Path>>(path: P) -> bool {
/// the empty string.
#[cfg(not(unix))]
pub fn is_file_name<P: AsRef<Path>>(path: P) -> bool {
path.as_ref().parent().map(|p| p.is_empty()).unwrap_or(false)
path.as_ref().parent().map(|p| p.as_os_str().is_empty()).unwrap_or(false)
}