fluffy-critter / bandcrash

Bandcamp-style batch encoder and web player for independent musicians
MIT License
57 stars 0 forks source link

Data files aren't portable between Windows and POSIX #69

Open fluffy-critter opened 1 year ago

fluffy-critter commented 1 year ago

Windows uses \, macOS and Linux uses /. A file written on one platform has the wrong path separator for the other.

Perhaps paths should be stored as lists of path components instead. For backwards compatibility, bandcrash.process should check all known file paths and convert them with os.path.join(*parts) if they're of type list.

fluffy-critter commented 1 year ago

Alternately, there could be an actual file loader (rather than each client using json.load or whatever) which attempts to clean up filepaths if they seem wrong for the platform

fluffy-critter commented 1 year ago

Also this is something of an edge case and there's a bunch of stuff that never can be handled portably between the systems, such as drives and network mounts, so... maybe this isn't something worth fixing. Keeping it open in case someone else has any strong opinions though.