diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bf834acd..70baf6e0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Drives with a directory containing a folder named 'folder' will now restore without error. - The CORSO_LOG_FILE env is appropriately utilized if no --log-file flag is provided. - Fixed Exchange events progress output to show calendar names instead of IDs. +- Fixed reporting no items match if restoring or listing details on an older Exchange backup and filtering by folder. ### Known Issues - Restoring a OneDrive or SharePoint file with the same name as a file with that name as its M365 ID may restore both items. diff --git a/src/pkg/selectors/exchange.go b/src/pkg/selectors/exchange.go index 4b0ac0ae5..e0c324157 100644 --- a/src/pkg/selectors/exchange.go +++ b/src/pkg/selectors/exchange.go @@ -617,8 +617,15 @@ func (ec exchangeCategory) pathValues( item = repo.Item() } + // Will hit the if-condition when we're at a top-level folder, but we'll get + // the same result when we extract from the RepoRef. + folder := ent.LocationRef + if len(folder) == 0 { + folder = repo.Folder(true) + } + result := map[categorizer][]string{ - folderCat: {ent.LocationRef}, + folderCat: {folder}, itemCat: {item, ent.ShortRef}, }