@@ -569,7 +569,7 @@ void Project::findSources(path p)
569569
570570 // correct root dir is detected and set during load phase
571571 if (p.empty ())
572- p = :: current_path ();
572+ p = current_thread_path ();
573573 if (p != root_directory)
574574 p /= root_directory;
575575
@@ -733,8 +733,8 @@ void Project::findSources(path p)
733733 fs::copy_file (CPPAN_FILENAME, root_directory / CPPAN_FILENAME, fs::copy_option::overwrite_if_exists);
734734 if (fs::exists (p / CPPAN_FILENAME))
735735 files.insert (p / CPPAN_FILENAME);
736- else if (fs::exists (:: current_path () / CPPAN_FILENAME))
737- files.insert (:: current_path () / CPPAN_FILENAME);
736+ else if (fs::exists (current_thread_path () / CPPAN_FILENAME))
737+ files.insert (current_thread_path () / CPPAN_FILENAME);
738738 else
739739 files.insert (CPPAN_FILENAME);
740740}
@@ -803,7 +803,7 @@ ProjectPath Project::relative_name_to_absolute(const String &name)
803803optional<ProjectPath> Project::load_local_dependency (const String &name)
804804{
805805 optional<ProjectPath> pp;
806- if (allow_local_dependencies && (fs::exists (:: current_path () / name) || isUrl (name)))
806+ if (allow_local_dependencies && (fs::exists (current_thread_path () / name) || isUrl (name)))
807807 {
808808 PackagesSet pkgs;
809809 Config c;
@@ -878,7 +878,7 @@ void Project::load(const yaml &root)
878878 {
879879 get_scalar_f (root, s, [&p, &s](const auto &n)
880880 {
881- auto cp = :: current_path ();
881+ auto cp = current_thread_path ();
882882 p = n.template as <String>();
883883 if (!is_under_root (cp / p, cp))
884884 throw std::runtime_error (" '" + s + " ' must not point outside the current dir: " + p.string () + " , " + cp.string ());
@@ -1274,8 +1274,8 @@ void Project::load(const yaml &root)
12741274 // to make some following default checks available
12751275 // try to detect and prepend root dir
12761276 {
1277- auto root = is_local ? findRootDirectory () : :: current_path ();
1278- if (root_directory.empty () || !fs::exists (:: current_path () / root_directory))
1277+ auto root = is_local ? findRootDirectory () : current_thread_path ();
1278+ if (root_directory.empty () || !fs::exists (current_thread_path () / root_directory))
12791279 root_directory = root;
12801280 else if (root_directory != root)
12811281 root_directory = root / root_directory;
0 commit comments