diff --git a/.gitignore b/.gitignore index 97cee810..1c6018ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +Rust_part/template.svg **/*.a **/*.so **/*.lib diff --git a/C_part/src/nsvg/copy.c b/C_part/src/nsvg/copy.c index cbcc2b29..28594829 100644 --- a/C_part/src/nsvg/copy.c +++ b/C_part/src/nsvg/copy.c @@ -34,10 +34,6 @@ char* gettemplate(int width, int height) { size_t size; char* data = NULL; fp = fopen(TEMPLATE_PATH, "rb"); - - if(fp == NULL && chdir("./target/release/") == 0) { //couldnt find template here and alternative location DOES exist - fp = fopen(TEMPLATE_PATH, "rb"); - } if(fp == NULL) { //still null after trying fix LOG_ERR("could not find svg template file."); diff --git a/Dockerfile b/Dockerfile index 0b6a8bd4..386af616 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,5 +34,4 @@ WORKDIR /home/sjsui/vectorizer/Rust_part/ RUN cargo build -vv --release #create entrypoint of container -WORKDIR /home/sjsui/vectorizer/Rust_part/target/release/ -CMD ["./trampoline"] \ No newline at end of file +CMD ["./target/release/trampoline"] \ No newline at end of file diff --git a/Rust_part/build.rs b/Rust_part/build.rs index cfb4e04f..1a6d9a16 100644 --- a/Rust_part/build.rs +++ b/Rust_part/build.rs @@ -44,9 +44,7 @@ fn main() { //copy the template svg let oldtemplate = String::from("../").add(TEMPLATE_NAME); - let mut newtemplate = var("OUT_DIR").unwrap(); - newtemplate = newtemplate.add("/../../../"); //fixes wtf OUT_DIR useless af - newtemplate = newtemplate.add(TEMPLATE_NAME); + let newtemplate = String::from(TEMPLATE_NAME); println!("copying template from: {}, to: {}", &oldtemplate, &newtemplate); let _ = copy(oldtemplate, newtemplate);