LibDesktop: Collapse if-else in AppFile

This commit is contained in:
Jelle Raaijmakers 2021-08-04 13:15:57 +02:00 committed by Linus Groh
parent c7e72a52a3
commit 0ec39aafb6
Notes: sideshowbarker 2024-07-18 07:29:43 +09:00

View File

@ -124,11 +124,9 @@ bool AppFile::spawn() const
if ((errno = posix_spawn(&child_pid, executable().characters(), nullptr, nullptr, const_cast<char**>(argv), environ))) {
perror("posix_spawn");
return false;
} else {
if (disown(child_pid) < 0) {
perror("disown");
return false;
}
} else if (disown(child_pid) < 0) {
perror("disown");
return false;
}
return true;