hollowaykeanho / Upscaler

A consolidation of various compiled open-source AI image/video upscaling product for a working CLI friendly image and video upscaling program.
BSD 3-Clause "New" or "Revised" License
251 stars 20 forks source link

unix.sh - fix mkdir issue #95

Closed lyoneel closed 5 months ago

lyoneel commented 5 months ago

fix issue when creating directory where input file of a video is in the same directory to output and has relative path.

Given: /usr/bin/upscaler --model upscayl-ultrasharp \ --scale 2 \ --format png \ --video \ --input my-video.mp4 \ --output my-video-upscaled

The program tries to create a directory ./my-video.mp4/something/something throws an error and stop the execution

This fix uses "my-video" instead of "my-video.mp4" as subject dir if subject_dir is equal to input.

hollowaykeanho commented 5 months ago

Thanks. I will accept and give it a run. Note that unless it breaks the core functionalities, I won't be patching further since my team is creating a new polygot scripts from scratch (init/start*) with CI maintainability.

lyoneel commented 5 months ago

I will not get offended if its reverted, no worries.

Thanks!