diff --git a/src/spec.rs b/src/spec.rs index 8a6feff0..d77c6daa 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -653,6 +653,9 @@ pub(crate) fn is_dir(filename: &str) -> bool { pub(crate) fn path_to_string>(path: T) -> Box { let mut maybe_original = None; if let Some(original) = path.as_ref().to_str() { + if (original.len() == 0) { + return String::new().into_boxed_str(); + } if (MAIN_SEPARATOR == '/' || !original[1..].contains(MAIN_SEPARATOR)) && !original.ends_with('.') && !original.starts_with(['.', MAIN_SEPARATOR])