You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed: two elements whose file names differ only in case are refused, where one of them was lost.write_folder names a file from the element's id, and when two ids of one type differ only in case (Ab1 and ab1, unnamed or both named Bob) it gave them file names that also differ only in case. A case-insensitive disk (Windows, macOS) keeps one file for both, so the folder held one element where the world had two. It now raises ValueError before anything is written, once the collision rule has chosen every name in a type folder, when two of them are one name under the folder format's name fold (NFC, then simple case folding, as the archive reader compares names): character element ids "Ab1" and "ab1" give the file names "Ab1.json" and "ab1.json", which are one name once folded (NFC, then simple case folding), so a case-insensitive disk (NTFS, APFS) may keep one file for both. The same refusal holds an unnamed id bob--x beside an element x named Bob, which were both written as bob--x.json on any disk. So are ids that differ as Ä1 and ä1, Σ1 and σ1, Dž1 and dž1, the Kelvin sign K1 and k1, or by normalization alone; İ1 and i1, and ß1 and ss1, stay two files. Ids in two types, and names whose slugs differ, are written as before, and every other folder keeps its bytes. The import doors and export_world write through write_folder and refuse alike. The npm SDK's folder writer refuses the same pairs in the same words (tests/fixtures/case-collide.cases.json, the same bytes in both).