nathan-sain / foundry-world-tools

A Python CLI for managing Foundry VTT assets on the file system
MIT License
10 stars 5 forks source link

Regex replace mangling ID in edge case #14

Closed EternalDeiwos closed 2 years ago

EternalDeiwos commented 2 years ago

Hey @nathan-sain,

We had an interesting case with our world where references started to fail for the following ID string: a7y5webpSBRhPGx4L. This was after we refactored all references from .png to .webp using the following command:

fwt dedup --ext=".png" --ext=".webp" --byname --preferred=".*webp"

The likelihood of jpg or png appearing as a substring in an ID is very low but seems like it is possible.

Any chance the regex can be altered to avoid this?

EternalDeiwos commented 2 years ago

Scratch this. Turns out the offending change was caused by a prior, naive regex replacement using sed.