From 71763b7f0719ee07a147193fad704d2f2418e7ef Mon Sep 17 00:00:00 2001 From: NA Date: Thu, 25 Jan 2024 17:28:45 +0000 Subject: [PATCH] I think this conversion is working now --- src/library.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/library.rs b/src/library.rs index d176238..4be36c1 100644 --- a/src/library.rs +++ b/src/library.rs @@ -2,8 +2,6 @@ use std::{fs::OpenOptions, io::Write, path::PathBuf, process::exit}; use chrono::prelude::Local; use clap::Args; -#[cfg(target_os = "windows")] -use path_slash::PathBufExt as _; use url::Url; @@ -126,7 +124,9 @@ pub fn generate_markdown(markdown_args: MarkdownArgs, book_url: Url, output_dire fn convert_path_to_windows(path: PathBuf) -> PathBuf { // If target os is windows. #[cfg(target_os = "windows")] { - return PathBuf::from_slash(path); + use path_slash::PathBufExt as _; + + return PathBuf::from_slash(path.into_os_string().into_string().unwrap()); } // If target os is not windows.