Asset store variant paths go over Windows' 260-character limit #15
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #14. A storage folder should survive a copy between Linux and Windows, but variant files in the asset store can have paths too long for some Windows tools.
Variant files are stored as
.assets/Variants/<signature>/<variant>, named with Resonite's variant identifier, e.g.version=3&compression=BC3nm_Crunched&quality=100&width=1024&height=1024&mips=False&filtering=Box&colorPreprocess=None&alphaPreprocess=None. In a real storage folder, 6,121 of 38,536 variant files exceed 260 characters under a root likeC:\Users\someone\Documents\LocalStorage\; the longest is 238 characters relative to the storage root.PackageAssets.EnumerateVariantslists only the variant files present in the store, so a skipped file costs a slower first load.Shortening the names changes the store layout, which
tools/rebuild-package.pyand the README's rebuild rule depend on, and existing stores would need converting.Fixed in
6e8fc3e, released as 0.7.17, deployed to MonkeyLoader/Mods.Layout:
Variants/<signature>/<id>, where<id>is the first 16 hex digits of the SHA-256 hash of the variant's full name, andVariantNames/<id>holds the full name. A name file only counts when its name hashes to its id. Name files are never swept, since sync can bring a variant file after its name. Full-name files from 0.7.16 and earlier are still read by the mod and byrebuild-package.py, and the first clean-up of a session renames them (renames only, so sync doesn't upload the variants again).Verified:
RLS_ROUNDTRIP_DIRround trip). Six new checks failed before the change.