mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-09 09:35:00 +09:00
Merge pull request #1451 from anyproto/go-2746-export-structure
GO-2746: add export structure
This commit is contained in:
commit
5acb29e2b4
4 changed files with 122 additions and 13 deletions
|
@ -84,8 +84,18 @@ func TestExportFiles(t *testing.T) {
|
|||
|
||||
var foundPbFiles int
|
||||
for _, entry := range entries {
|
||||
if filepath.Ext(entry.Name()) == ".pb" {
|
||||
foundPbFiles++
|
||||
if entry.IsDir() {
|
||||
files, err := os.ReadDir(filepath.Join(exportPath, entry.Name()))
|
||||
require.NoError(t, err)
|
||||
for _, file := range files {
|
||||
if filepath.Ext(file.Name()) == ".pb" {
|
||||
foundPbFiles++
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if filepath.Ext(entry.Name()) == ".pb" {
|
||||
foundPbFiles++
|
||||
}
|
||||
}
|
||||
}
|
||||
// 4 objects total: Page object + Page type + File object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue