1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-11 18:20:33 +09:00

GO-2746: add comments

Signed-off-by: AnastasiaShemyakinskaya <shem98a@mail.ru>
This commit is contained in:
AnastasiaShemyakinskaya 2024-08-08 12:35:51 +02:00
parent 4501c586ba
commit b4f8757e1f
No known key found for this signature in database
GPG key ID: CCD60ED83B103281

View file

@ -519,6 +519,7 @@ func (e *export) makeMarkdownName(s *state.State, wr writer, docID string, conv
name = s.Snippet()
}
path := ""
// space can be empty in case user want to export all spaces
if spaceId == "" {
spaceId := pbtypes.GetString(s.LocalDetails(), bundle.RelationKeySpaceId.String())
path = filepath.Join(spaceDirectory, spaceId)
@ -529,6 +530,7 @@ func (e *export) makeMarkdownName(s *state.State, wr writer, docID string, conv
func (e *export) makeFileName(docId, spaceId string, conv converter.Converter, st *state.State, blockType smartblock.SmartBlockType) string {
dir := e.provideFileDirectory(blockType)
filename := filepath.Join(dir, docId+conv.Ext())
// space can be empty in case user want to export all spaces
if spaceId == "" {
spaceId := pbtypes.GetString(st.LocalDetails(), bundle.RelationKeySpaceId.String())
filename = filepath.Join(spaceDirectory, spaceId, filename)