def_find_library(library_name: PathStr) -> Path:
result=Path(library_name)
ifnotresult.is_absolute():
paths=_openscad_library_paths()
forpinpaths:
f=p/result# print(f'Checking {f} -> {f.exists()}')iff.exists():
result=freturnresultThis means a file found in paths[2] overwrites a file in paths[0] and since openscad_library_paths returns [".", os.env_paths, "platform_path"] if I understand it correctly, a file in the "platform_path" (.local/share/openscad/libraries/) would overwrite a local file (./). I think this is not the way resolving filenames are usually working.
I think the line result = f should be return f.
(cf resolve_scad_filename from 1a1d97c)
Furthermore what about system include path? At least on my system MCAD is also installed in /usr/share/openscad/libraries/MCAD I guess this should be added to _openscad_library_paths, right?
This means a file found in paths[2] overwrites a file in paths[0] and since openscad_library_paths returns [".", os.env_paths, "platform_path"] if I understand it correctly, a file in the "platform_path" (.local/share/openscad/libraries/) would overwrite a local file (./). I think this is not the way resolving filenames are usually working.
I think the line
result = fshould bereturn f.(cf
resolve_scad_filenamefrom 1a1d97c)Furthermore what about system include path? At least on my system MCAD is also installed in
/usr/share/openscad/libraries/MCADI guess this should be added to_openscad_library_paths, right?