mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 02:31:25 +01:00
Processing (Windows): handles ERROR_PATH_NOT_FOUND
This commit is contained in:
@@ -167,10 +167,12 @@ const char* ffProcessSpawn(char* const argv[], bool useStdErr, FFNativeFD stdinF
|
|||||||
|
|
||||||
NtClose(hChildPipeWrite);
|
NtClose(hChildPipeWrite);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
|
DWORD error = GetLastError();
|
||||||
|
if (error == ERROR_FILE_NOT_FOUND || error == ERROR_PATH_NOT_FOUND) {
|
||||||
|
FF_DEBUG("Command not found: %s (%s)", argv[0], ffDebugWin32Error(error));
|
||||||
return "command not found";
|
return "command not found";
|
||||||
}
|
}
|
||||||
FF_DEBUG("CreateProcessW() failed: %s", ffDebugWin32Error(GetLastError()));
|
FF_DEBUG("CreateProcessW(%s) failed: %s", argv[0], ffDebugWin32Error(error));
|
||||||
return "CreateProcessW() failed";
|
return "CreateProcessW() failed";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user