Skip to content

Commit

Permalink
prints to see why symlinks fail
Browse files Browse the repository at this point in the history
  • Loading branch information
avendauz committed Aug 9, 2021
1 parent e14a417 commit b6d7804
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/nft/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ func handleMsgPublishFile(ctx sdk.Context, k Keeper, msg *types.MsgPublishFile)
k.BtClient.RetrieveFile(&metainfo)
k.EnsureNftDirExists()
fmt.Println("Creating symlink")
fmt.Println("Linking new file", `k.HomeDir+"/nft/"+msg.Vendor + "-" + msg.Id`)
fileInfo, fileErr := os.Stat(k.HomeDir+"/nft/"+msg.Hash)
fmt.Println(fileInfo, fileErr)
err := os.Symlink(k.HomeDir+"/nft/"+msg.Hash, k.HomeDir+"/nft/"+msg.Vendor + "-" + msg.Id)

if err != nil {
fmt.Println("First symlink failed")
fmt.Println(err)
return nil, err
}
fmt.Println("Filling nft info struct")
Expand Down

0 comments on commit b6d7804

Please sign in to comment.