~jamesponddotco/bonk

1348dcbfd82d6458860299e4221eeba0767704c1 — James Pond 2 months ago f562c3c trunk
Update path field to include full directory path

Signed-off-by: James Pond <james@cipher.host>
1 files changed, 8 insertions(+), 2 deletions(-)

M src/process.rs
M src/process.rs => src/process.rs +8 -2
@@ 85,7 85,13 @@ pub fn image(model: &Model, path: &PathBuf, threshold: f32) -> Result<SingleOutp

    Ok(SingleOutput {
        has_nudity,
        path: path.parent().unwrap().to_string_lossy().into_owned(),
        path: path
            .parent()
            .unwrap()
            .canonicalize()
            .unwrap()
            .to_string_lossy()
            .into_owned(),
        filename: path.file_name().unwrap().to_string_lossy().into_owned(),
        predictions,
    })


@@ 156,7 162,7 @@ pub fn directory(model: &Model, path: &Path, threshold: f32) -> Result<MultiOutp

                Some(Output {
                    has_nudity,
                    path: file_path.parent().unwrap().to_string_lossy().into_owned(),
                    path: file_path.parent().unwrap().canonicalize().unwrap().to_string_lossy().into_owned(),
                    filename: file_path
                        .file_name()
                        .unwrap()