mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-11-27 00:30:40 +00:00
Merge pull request #4154 from Liamolucko/check-home
Some checks failed
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Has been cancelled
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Has been cancelled
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Has been cancelled
Some checks failed
Build + Test / build_plus_test ([self-hosted ARMv8.0]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.2]) (push) Has been cancelled
Build + Test / build_plus_test ([self-hosted ARMv8.4]) (push) Has been cancelled
GLIBC fault test / glibc_fault_test ([self-hosted ARM64]) (push) Has been cancelled
Hostrunner tests / hostrunner_tests ([self-hosted x64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted ARM64]) (push) Has been cancelled
Instruction Count CI run / instcountci_tests ([self-hosted x64]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64 mingw]) (push) Has been cancelled
Mingw build / mingw_build ([self-hosted ARM64EC mingw ARM64]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted ARMv8.4]) (push) Has been cancelled
Vixl Simulator run / vixl_simulator ([self-hosted x64]) (push) Has been cancelled
Check if a candidate home directory exists before using it
This commit is contained in:
commit
e675f4241a
@ -439,17 +439,17 @@ const char* GetHomeDirectory() {
|
||||
const char* HomeDir = getenv("HOME");
|
||||
|
||||
// Try to get home directory from uid
|
||||
if (!HomeDir) {
|
||||
if (!HomeDir || !FHU::Filesystem::Exists(HomeDir)) {
|
||||
HomeDir = FindUserHomeThroughUID();
|
||||
}
|
||||
|
||||
// try the PWD
|
||||
if (!HomeDir) {
|
||||
if (!HomeDir || !FHU::Filesystem::Exists(HomeDir)) {
|
||||
HomeDir = getenv("PWD");
|
||||
}
|
||||
|
||||
// Still doesn't exit? You get local
|
||||
if (!HomeDir) {
|
||||
if (!HomeDir || !FHU::Filesystem::Exists(HomeDir)) {
|
||||
HomeDir = ".";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user