Skip to content

Commit

Permalink
Return actual filteredRootId instead of parsedRootId when using getGl…
Browse files Browse the repository at this point in the history
…obFiles

Summary:
# Bug Description
When creating the remote glob object in FilteredFS, we formerly returned the parsedRootId instead of the filteredRootId. This caused issues down the line when rendering the rootId since it no longer contained a length specifier, causing undefined behavior and a crash.

# This Diff
UIse filteredRootId in the GetGlobFiles Result object instead of the parsedRootId

Reviewed By: MichaelCuevas

Differential Revision: D65488953

fbshipit-source-id: 5ab826be3c4f2ae1290d327c7ff5858d9a49196c
  • Loading branch information
Chris Dinh authored and facebook-github-bot committed Nov 6, 2024
1 parent f601045 commit 49ac39a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eden/fs/store/FilteredBackingStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ FilteredBackingStore::getGlobFiles(
const std::vector<std::string>& globs) {
auto [parsedRootId, parsedFilterId] = parseFilterIdFromRootId(id);
auto fut = backingStore_->getGlobFiles(parsedRootId, globs);
return std::move(fut).thenValue([this, filterId = parsedFilterId](
return std::move(fut).thenValue([this, id, filterId = parsedFilterId](
auto&& getGlobFilesResult) {
std::vector<ImmediateFuture<std::pair<std::string, FilterCoverage>>>
isFilteredFutures;
Expand All @@ -411,7 +411,7 @@ FilteredBackingStore::getGlobFiles(
isFilteredFutures.emplace_back(std::move(filterFut));
}
return collectAllSafe(std::move(isFilteredFutures))
.thenValue([rootId = getGlobFilesResult.rootId](
.thenValue([rootId = id](
std::vector<std::pair<std::string, FilterCoverage>>&&
filterCoverageVec) {
std::vector<std::string> filteredPaths;
Expand Down

0 comments on commit 49ac39a

Please sign in to comment.