Unfortunately I had a lot of links pointing back at legacy paths.
Here’s my middleground solution that I think allows me to move forward
with the new scheme for paths while not having to move my old files:
workaround for legacy attachments
if LEGACY_IMAGE_FILE_PATHS_UP_TO.nil? or attachment_path_id.to_i >
("%08d" % attachment_path_id).scan(/…/) + args
[attachment_path_id.to_s] + args
I’ve got about 10k existing image files with ids up to about 49081,
since the new scheme starts creating directories at 0000, I doubt I’ll
see any directory names that will collide. I must admit to being lazy
in the math department. Am I missing anything?