Search code examples
logtalk

Logtalk : Load a file with camelcase naming on Windows


With logtalk 3.1.2, under OS X and Linux, no problem to load a file with a camelcase name, but an exception is thrown on Windows (ERROR : file does not exist).

logtalk_load(mypath(myFileNameInCameCase))

What's wrong ?


Solution

  • Some backend Prolog compilers, such as SWI-Prolog when running on Windows, down-case file names when expanding file paths into absolute file paths. This caused a failure in the Logtalk compiler when going from the file argument in the compilation and loading predicates to an absolute file path and its components (directory, name, and extension). A workaround have been found and committed to the current git version. Thanks for the bug report.