mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 00:52:16 +00:00
Fix is_root check to account for Windows paths.
Windows drive style paths should also be considered rooted as otherwise we can't bootstrap when we specify one of those paths. This caused a regression in Boost where that is regularly used.
This commit is contained in:
@@ -578,6 +578,10 @@ stages:
|
||||
vmImage: 'windows-latest'
|
||||
strategy:
|
||||
matrix:
|
||||
1.73.0 .. VS 2019:
|
||||
BOOST_VERSION: 1.73.0
|
||||
BOOST_VERSION_U: 1_73_0
|
||||
TOOLSET: vc142
|
||||
1.72.0 .. VS 2019:
|
||||
BOOST_VERSION: 1.72.0
|
||||
BOOST_VERSION_U: 1_72_0
|
||||
|
||||
@@ -99,7 +99,14 @@ namespace b2
|
||||
{
|
||||
inline bool is_rooted(const std::string &p)
|
||||
{
|
||||
return p[0] == '/' || p[0] == '\\';
|
||||
#if NT
|
||||
return
|
||||
(p.size() >= 1 && (p[0] == '/' || p[0] == '\\')) ||
|
||||
(p.size() >= 3 && p[1] == ':' && (p[2] == '/' || p[2] == '\\'));
|
||||
#else
|
||||
return
|
||||
(p.size() >= 1 && (p[0] == '/' || p[0] == '\\'));
|
||||
#endif
|
||||
}
|
||||
std::string normalize(const std::string &p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user