Removed the check relating to being able to write in the target directory.

It was broken on windows.
This commit is contained in:
NA 2024-01-26 16:17:48 +00:00
parent 1b0b9b57b3
commit 73a4599fb6
2 changed files with 2 additions and 7 deletions

View file

@ -75,12 +75,6 @@ fn valid_directory_check(output_directory: &Path) {
}
}
}
// Check if the user has write permissions:
if fs::metadata(output_directory).unwrap().permissions().readonly() {
eprintln!("Error! You do not have permissions for the specified directory.");
exit(1);
}
}
// Check if the given URL is a valid royalroad url.

View file

@ -30,7 +30,8 @@ pub fn remove_illegal_chars(mut string: String) -> String {
/// Setup html2xhtml in the operating system's temp directory.
pub fn setup_html2xhtml() -> TempDir {
#[cfg(target_os = "windows")] {
const HTML2XHTML: &[u8; 268299] = include_bytes!(r"..\html2xhtml-windows.zip");
const HTML2XHTML: &[u8; 268299] = include_bytes!("../html2xhtml-windows.zip"); // This will not compile on windows due to this and no I don't give a shit.
// Compile it on linux for windows like a sane person.
let html2xhtml_dir = match TempDir::new("html2xhtml-windows") {
Ok(temp_dir) => temp_dir,
Err(error) => {