mirror of
https://github.com/Raine-gay/royal_road_archiver.git
synced 2024-11-23 07:38:42 -06:00
Removed the check relating to being able to write in the target directory.
It was broken on windows.
This commit is contained in:
parent
1b0b9b57b3
commit
73a4599fb6
|
@ -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.
|
// Check if the given URL is a valid royalroad url.
|
||||||
|
|
|
@ -30,7 +30,8 @@ pub fn remove_illegal_chars(mut string: String) -> String {
|
||||||
/// Setup html2xhtml in the operating system's temp directory.
|
/// Setup html2xhtml in the operating system's temp directory.
|
||||||
pub fn setup_html2xhtml() -> TempDir {
|
pub fn setup_html2xhtml() -> TempDir {
|
||||||
#[cfg(target_os = "windows")] {
|
#[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") {
|
let html2xhtml_dir = match TempDir::new("html2xhtml-windows") {
|
||||||
Ok(temp_dir) => temp_dir,
|
Ok(temp_dir) => temp_dir,
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
|
|
Loading…
Reference in a new issue