bake icon indicating copy to clipboard operation
bake copied to clipboard

Fix amalgamate on windows

Open ZeroErrors opened this issue 3 years ago • 0 comments

Change Log

  • Fix crash caused by passing FILE* across DLL boundaries on windows when calling ut_file_readln from amalgamate. To fix this I replaced fopen/fclose with ut_file_open/ut_file_close so that bake util is the only thing interacting with the FILE* passed to ut_file_readln.
  • Made amalgamate normalize file paths using UT_OS_PS so they are always consistent when added to files_parsed and when getting the current directory from the file path on windows.

Known Bugs

  • Currently bake amalgamate iterates files only using the order returned by the file system, this leads to inconsistent ordering when used on different file systems. To fix this the file paths need to be sorted so they are always processed in the same order. Because of this I've left amalgamate disabled on windows but this is likely to affect other environments as well.

ZeroErrors avatar Aug 19 '22 14:08 ZeroErrors