From 72285023049621715656af1d9ca8373030c59cf8 Mon Sep 17 00:00:00 2001 From: Karl F Date: Fri, 1 Nov 2024 09:44:05 +0100 Subject: [PATCH] Fix $HOME/.pioneer randomly created on Linux --- src/posix/FileSystemPosix.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/posix/FileSystemPosix.cpp b/src/posix/FileSystemPosix.cpp index b2a2ff8ec31..fb36147b66f 100644 --- a/src/posix/FileSystemPosix.cpp +++ b/src/posix/FileSystemPosix.cpp @@ -61,8 +61,8 @@ namespace FileSystem { path += "Library/Application Support/Pioneer"; #else struct stat info; - stat((path + ".pioneer").c_str(), &info); - if (S_ISDIR(info.st_mode)) { + int err = stat((path + ".pioneer").c_str(), &info); + if (err == 0 && S_ISDIR(info.st_mode)) { // Check for legacy pioneer directory. path += ".pioneer"; } else {