Regex does not match glob pattern for windows paths
elrnv opened this issue · comments
If we run gltfgen on files in a subdirectory, for example:
$ gltfgen output.glb "./subdir/{file}_#.obj"
on windows, then the glob pattern will interpreted as a windows path, so the forward slashes will be converted to backslashes, and thereby mismatch the equivalent regex, which means that all the input files will be ignored with the following warning being produced:
WARNING: Path 'subdir\file_1.obj' skipped since regex '^subdir/file_(?P<frame>[0-9]+)\.obj$' did not match.
To work around this issue, we can run gltfgen with escaped backslashes and omitted initial dot:
$ gltfgen output.glb "subdir\\{file}_#.obj"
In my experience these types of workarounds behave differently on different terminals. This one I tested with Alacritty running powershell.