Open fluffy-critter opened 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
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.
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 withos.path.join(*parts)
if they're of typelist
.