Skip to content

Fixed wrong support folder when using .NET 8 on Unix#21583

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
Mailaender:net8-personal-folder
Sep 16, 2024
Merged

Fixed wrong support folder when using .NET 8 on Unix#21583
PunkPun merged 1 commit into
OpenRA:bleedfrom
Mailaender:net8-personal-folder

Conversation

@Mailaender

@Mailaender Mailaender commented Sep 15, 2024

Copy link
Copy Markdown
Member

It saves into ~/Documents/.config/openra/ instead of ~/.config/openra/ on Linux. https://learn.microsoft.com/dotnet/core/compatibility/core-libraries/8.0/getfolderpath-unix Discovered during #21577. Also effects https://launchpad.net/~xtradeb/+archive/ubuntu/play/+build/28130160 which is already on .NET 8.

@Mailaender Mailaender changed the title Adapt to upcoming environment special folder change. Fixed wrong support folder when using .NET 8 on Linux Sep 15, 2024
@RoosterDragon

Copy link
Copy Markdown
Member

So to make sure I'm reading the notes correctly:

  • Personal resolves to $HOME in net6, but will resolve to $HOME/Documents (or other things) in net8
  • UserProfile resolves to $HOME in both net6 and net8

Therefore making this changes doesn't break net6, and fixes us in prep for net8.

  1. Is the above correct?
  2. Should adjust the macOS case as well?
  3. And the default case?
  4. And the Windows case just to match - or does that need to stay as is to prevent any paths changing?

@anvilvapre

Copy link
Copy Markdown
Contributor

ms will always stay ms.

@pchote

pchote commented Sep 16, 2024

Copy link
Copy Markdown
Member

According to https://learn.microsoft.com/en-gb/dotnet/core/compatibility/core-libraries/8.0/getfolderpath-unix#macos, yes, macOS will also need to be changed.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that updating it for macOS fixes my issues with #21577, and doesn't mess up current bleed build

@PunkPun PunkPun added this to the Next Release milestone Sep 16, 2024
@Mailaender Mailaender changed the title Fixed wrong support folder when using .NET 8 on Linux Fixed wrong support folder when using .NET 8 on Unix Sep 16, 2024
@PunkPun
PunkPun merged commit 2aa37d9 into OpenRA:bleed Sep 16, 2024
@PunkPun

PunkPun commented Sep 16, 2024

Copy link
Copy Markdown
Member

changelog

@Mailaender
Mailaender deleted the net8-personal-folder branch September 16, 2024 17:11
@RoosterDragon

Copy link
Copy Markdown
Member

The default case also appears to be a Linux flavour as well, I think that should've been updated too.

@Mailaender

Copy link
Copy Markdown
Member Author

No, that would be covered by the platform Linux case. Did I miss BSD?

@RoosterDragon

Copy link
Copy Markdown
Member

I don't know what platforms would trigger the default case, but it's clearly largely a copy-paste of the Linux case so it makes to keep them aligned rather than not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants