DeadSix27 / waifu2x-converter-cpp

Improved fork of Waifu2X C++ using OpenCL and OpenCV
MIT License
792 stars 86 forks source link

Kernel is keep creating on Linux #239

Open YukihoAA opened 4 years ago

YukihoAA commented 4 years ago

in linux, opencl kernel file is keep created without consider kernel is exists or not.

because, on existing check code, on L412 in modelHandler_OpenCL.cpp,

std::string bin_path = std::string(self_path) + "/" + dev_nameStr + ".bin";

but output bin path without root permission is L560

user_folder = std::string($Home) + "/.waifu2x"; bin_path = user_folder + "/" + dev_nameStr + ".bin";