editor: explicit runtime path contract
This commit is contained in:
@@ -12,13 +12,11 @@ namespace {
|
||||
std::filesystem::path ResolveBuildCaptureRoot(
|
||||
const std::filesystem::path& requestedCaptureRoot,
|
||||
const std::filesystem::path& executableDirectory) {
|
||||
std::filesystem::path captureRoot = executableDirectory / "captures";
|
||||
const std::filesystem::path scenarioPath = requestedCaptureRoot.parent_path().filename();
|
||||
if (!scenarioPath.empty() && scenarioPath != "captures") {
|
||||
captureRoot /= scenarioPath;
|
||||
if (!requestedCaptureRoot.empty()) {
|
||||
return requestedCaptureRoot.lexically_normal();
|
||||
}
|
||||
|
||||
return captureRoot.lexically_normal();
|
||||
return (executableDirectory / "captures").lexically_normal();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user