Skip to content

Commit

Permalink
chore: removed cbor dag file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
f7f376a1fcd0d0e11a10ed1b6577c9 committed Mar 17, 2024
1 parent b973685 commit 8b308cb
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"io/fs"
"io/ioutil"
"log"
"os"
"path/filepath"
"sort"
Expand Down Expand Up @@ -282,24 +281,26 @@ func (dag *Dag) CreateDirectory(path string, encoder multibase.Encoder) error {
return err
}

cborData, err := dag.ToCBOR()
if err != nil {
log.Println("Failed to serialize dag into cbor")
os.Exit(1)
}
/*
cborData, err := dag.ToCBOR()
if err != nil {
log.Println("Failed to serialize dag into cbor")
os.Exit(1)
}
fileName := filepath.Join(path, ".dag")
file, err := os.Create(fileName)
if err != nil {
return err
}
fileName := filepath.Join(path, ".dag")
file, err := os.Create(fileName)
if err != nil {
return err
}
defer file.Close()
defer file.Close()
_, err = file.Write(cborData)
if err != nil {
return fmt.Errorf("failed to write to file: %w", err)
}
_, err = file.Write(cborData)
if err != nil {
return fmt.Errorf("failed to write to file: %w", err)
}
*/

/*
if runtime.GOOS == "windows" {
Expand Down

0 comments on commit 8b308cb

Please sign in to comment.