AppData folder: am I a joke to you?

  • AnyOldName3@lemmy.world
    link
    fedilink
    English
    arrow-up
    45
    ·
    6 hours ago

    If you write cross-platform software, the easiest solution is usually to pretend everything’s Unix. You’ll hit some problems (e.g. assuming all filesystem APIs always use UTF-8 will bite you on Windows, which switched to UCS2 before UTF-8 or UTF-16 were invented, so now uses UTF-16 for Unicode-aware functions as that’s the one that’s ABI compatible with UCS2, and passing UTF-8 to the eight-bit-char functions requires you to opt into that mode explicitly), but mostly everything will just work. There’s no XDG_CONFIG telling you to put these files anywhere in particular, as Windows is Windows, so most things use ~ as a fallback, which Windows knows to treat as %USERPROFILE%.

    • merthyr1831@lemmy.ml
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 hours ago

      Lots of frameworks for applications and games have automatic translation of file paths to sensible directories, but when you’re writing software you’re probably doing shit fast and dirty until it’s ready for release, by that time you now have a bunch of people relying on your software so changing the file structure will cause loads of issues.