handle path for channel (#4257)

<!-- PR description-->

Handle the path creation for Onedrive and Channel.

#### Does this PR need a docs update or release note?

- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🐛 Bugfix

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
This commit is contained in:
neha_gupta 2023-09-16 00:09:04 +05:30 committed by GitHub
parent 8602bd132b
commit 6b8b500df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -109,7 +109,16 @@ func AugmentRestorePaths(
// of the directory.
colPaths := map[string]path.RestorePaths{}
allowedCategories := map[path.CategoryType]struct{}{
path.LibrariesCategory: {},
path.FilesCategory: {},
}
for _, p := range paths {
if _, ok := allowedCategories[p.StoragePath.Category()]; !ok {
continue
}
first := true
for {

View File

@ -143,7 +143,8 @@ func makeRestorePathsForEntry(
// * Exchange Email/Contacts
// * OneDrive/SharePoint (needs drive information)
switch true {
case ent.Exchange != nil:
case ent.Exchange != nil ||
(ent.Groups != nil && ent.Groups.ItemType == details.GroupsChannelMessage):
// TODO(ashmrtn): Eventually make Events have it's own function to handle
// setting the restore destination properly.
res.RestorePath, err = basicLocationPath(repoRef, locRef)