Allow relative CLUT paths (#3639) by @agriggio
Kudos to Alberto Griggio for this contribution! 👍
This commit is contained in:
@@ -307,12 +307,17 @@ std::shared_ptr<rtengine::HaldCLUT> rtengine::CLUTStore::getClut(const Glib::ust
|
||||
{
|
||||
std::shared_ptr<rtengine::HaldCLUT> result;
|
||||
|
||||
if (!cache.get(filename, result)) {
|
||||
Glib::ustring full_filename = filename;
|
||||
if ( !Glib::path_is_absolute(full_filename) ) {
|
||||
full_filename = Glib::build_filename(options.clutsDir, filename);
|
||||
}
|
||||
|
||||
if (!cache.get(full_filename, result)) {
|
||||
std::unique_ptr<rtengine::HaldCLUT> clut(new rtengine::HaldCLUT);
|
||||
|
||||
if (clut->load(filename)) {
|
||||
if (clut->load(full_filename)) {
|
||||
result = std::move(clut);
|
||||
cache.insert(filename, result);
|
||||
cache.insert(full_filename, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user