Closed P4sca1 closed 1 year ago
I have just tested it on clean Ubuntu 2020.04 LTS and Debian 11 installations and it's not the case. It doesn't return an empty string if the path doesn't exist.
Many SCP:SL communities (including our official ones) run LocalAdmin in Docker containers, where the .config folder doesn't exist and it was never an issue for anyone either.
Weird, I started to get the error can't obtain a valid user home directory path
recently. It was fixed after I created the .config
folder manually. I'm running from a docker container based on Ubuntu 22.04. The env variable HOME=home/myuser
is set.
Interesting issue. I will retest it on Ubuntu 22.04 LTS then.
If you run it in docker (presumably using pterodactyl), adding a command to create that path shouldn't be an issue as a temporary workaround.
I am using my own docker image from https://GitHub.com/ips-hosting/game-images and did just that to fix the issue. Maybe one of my other command line arguments was causing the issue.
Testing with Ed_PlayZ. This issue is occouring on clean installs of Ubuntu.
https://nextcloud.j-stuff.net/s/Hinb9SHmNKefBx8
It requires a .config directory to be created manually by the user in the home directory of the host user to remove the error.
I can't reproduce the issue (even on a clean installation of Ubuntu 2020.04 LTS), but I made a PR that should fix this bug.
@P4sca1 @J-Stuff Can you test the build from PR (https://github.com/northwood-studios/LocalAdmin-V2/suites/10123726988/artifacts/494040544)? I can't reproduce the issue.
@zabszk seems to be fixed in that one.
Fixed in the test build! https://nextcloud.j-stuff.net/s/9aEBJHrPTsp9ayx
Fixed in the test build! https://nextcloud.j-stuff.net/s/9aEBJHrPTsp9ayx
Thanks for testing.
Environment.GetFolderPath
returns an empty string, when the path does not exist. According to https://jimrich.sk/environment-specialfolder-on-windows-linux-and-os-x/System.Environment.SpecialFolder.ApplicationData
resolves to/home/{user}/.config
, which is a directory that does not exist by default (at least on ubuntu).