https://bugs.gentoo.org/932780 https://github.com/freeorion/freeorion/issues/4897 Backport of: https://github.com/freeorion/freeorion/pull/4899/commits --- a/GG/src/dialogs/FileDlg.cpp +++ b/GG/src/dialogs/FileDlg.cpp @@ -11,3 +11,3 @@ #include -#include +#include #include @@ -217,3 +217,3 @@ fs::path filename_path = fs::system_complete(fs::path(m_init_filename)); - m_files_edit->SetText(filename_path.leaf().string()); + m_files_edit->SetText(filename_path.filename().string()); } @@ -550,3 +550,3 @@ if ((s_working_dir.string() != s_working_dir.root_path().string() && - !s_working_dir.branch_path().string().empty()) || + !s_working_dir.parent_path().string().empty()) || Win32Paths()) @@ -696,6 +696,6 @@ if (s_working_dir.string() != s_working_dir.root_path().string() && - !s_working_dir.branch_path().string().empty()) + !s_working_dir.parent_path().string().empty()) { // move to new directory - SetWorkingDirectory(s_working_dir.branch_path()); + SetWorkingDirectory(s_working_dir.parent_path()); --- a/util/Directories.cpp +++ b/util/Directories.cpp @@ -6,5 +6,4 @@ #include -#include -#include #include +#include @@ -268,3 +267,3 @@ fs::path binary_file = fs::system_complete(FilenameToPath(argv0)); - bin_dir = binary_file.branch_path(); + bin_dir = binary_file.parent_path(); } catch (const fs::filesystem_error &) { @@ -317,3 +316,3 @@ fs::path binary_file = fs::system_complete(fs::path(path_text)); - bin_dir = binary_file.branch_path(); + bin_dir = binary_file.parent_path(); --- a/util/OptionsDB.cpp +++ b/util/OptionsDB.cpp @@ -16,4 +16,3 @@ #include -#include -#include +#include #include