Revert "force omission of meta files (#2662)" (#2706)

This reverts commit 1945db6b65827e6dd6d57de8ac42fe4a119db685.

We do add the `isMeta` flags for missing items at f60207ee32/src/pkg/repository/repository.go (L363)

---

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

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

#### 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
- [x]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-03-24 13:18:28 +05:30 committed by GitHub
parent d72282e0df
commit c3610d1832
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 14 deletions

View File

@ -5,7 +5,6 @@ import (
"encoding/json" "encoding/json"
"io" "io"
"strconv" "strconv"
"strings"
"sync" "sync"
"time" "time"
@ -128,13 +127,9 @@ func (dm DetailsModel) FilterMetaFiles() DetailsModel {
// additional data like permissions in case of OneDrive and are not to // additional data like permissions in case of OneDrive and are not to
// be treated as regular files. // be treated as regular files.
func (de DetailsEntry) isMetaFile() bool { func (de DetailsEntry) isMetaFile() bool {
if de.ItemInfo.OneDrive == nil { // TODO: Add meta file filtering to SharePoint as well once we add
return false // meta files for SharePoint.
} return de.ItemInfo.OneDrive != nil && de.ItemInfo.OneDrive.IsMeta
return de.ItemInfo.OneDrive.IsMeta ||
strings.HasSuffix(de.RepoRef, ".meta") ||
strings.HasSuffix(de.RepoRef, ".dirmeta")
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@ -255,8 +255,8 @@ var pathItemsTable = []struct {
}, },
}, },
}, },
expectRepoRefs: []string{"abcde"}, expectRepoRefs: []string{"abcde", "foo.meta"},
expectLocationRefs: []string{"locationref"}, expectLocationRefs: []string{"locationref", "locationref.dirmeta"},
}, },
{ {
name: "multiple entries with folder and meta file", name: "multiple entries with folder and meta file",
@ -293,8 +293,8 @@ var pathItemsTable = []struct {
}, },
}, },
}, },
expectRepoRefs: []string{"abcde", "12345"}, expectRepoRefs: []string{"abcde", "12345", "foo.meta"},
expectLocationRefs: []string{"locationref", "locationref2"}, expectLocationRefs: []string{"locationref", "locationref2", "locationref.dirmeta"},
}, },
} }
@ -363,7 +363,7 @@ func (suite *DetailsUnitSuite) TestDetailsModel_FilterMetaFiles() {
d2 := d.FilterMetaFiles() d2 := d.FilterMetaFiles()
assert.Len(t, d2.Entries, 1) assert.Len(t, d2.Entries, 2)
assert.Len(t, d.Entries, 3) assert.Len(t, d.Entries, 3)
} }

View File

@ -19,7 +19,7 @@ Below is a list of known Corso issues and limitations:
* Provides no guarantees about whether data moved, added, or deleted in M365 * Provides no guarantees about whether data moved, added, or deleted in M365
while a backup is being created will be included in the running backup. while a backup is being created will be included in the running backup.
Future backups run when the data isn't modified will include the data. Future backups run when the data isn't modified will include the data.
* OneDrive files ending in `.meta` or `.dirmeta` get omitted from Details and Restore commands. * OneDrive files ending in `.meta` or `.dirmeta` get omitted from Details and Restore commands.
* Exchange Calender Event instance exceptions (changes to a single event within a recurring series) aren't * Exchange Calender Event instance exceptions (changes to a single event within a recurring series) aren't