1
0
forked from 0ad/0ad

Fix build with Boost 1.85

Patch by: @Cayleb-Ordo
Accepted by: @Stan
Comments by: @sera
Differential Revision: https://code.wildfiregames.com/D5267
This was SVN commit r28176.
This commit is contained in:
Stan 2024-08-02 16:17:22 +00:00
parent 1ca3e6d3bc
commit 0831f5d3ce
3 changed files with 9 additions and 3 deletions

View File

@ -57,6 +57,7 @@
{ "nick": "Calefaction", "name": "Matt Holmes" },
{ "nick": "Calvinh", "name": "Carl-Johan Höiby" },
{ "nick": "causative", "name": "Bart Parkis" },
{ "nick": "Cayleb-Ordo", "name": "Simon Fentzl" },
{ "name": "Cédric Houbart" },
{ "nick": "Ceres" },
{ "nick": "Chakakhan", "name": "Kenny Long" },

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -806,7 +806,7 @@ public:
files.push_back(f);
p = p / GetWstringFromWpath(*it);
}
return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.leaf()), files);
return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.filename()), files);
}
/**

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@ -32,6 +32,7 @@
#include "lib/sysdep/filesystem.h"
#include <boost/filesystem.hpp>
#include <boost/version.hpp>
#include <memory>
bool DirectoryExists(const OsPath& path)
@ -229,7 +230,11 @@ Status CopyFile(const OsPath& path, const OsPath& newPath, bool override_if_exis
try
{
if(override_if_exists)
#if BOOST_VERSION >=107400
fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_options::overwrite_existing);
#else
fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_option::overwrite_if_exists);
#endif
else
fs::copy_file(fs::path(path.string()), fs::path(newPath.string()));
}