mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 07:28:20 +08:00
probably fix OSX ipns bug
This commit is contained in:
@ -300,10 +300,12 @@ func TestFastRepublish(t *testing.T) {
|
||||
|
||||
// Test writing a medium sized file one byte at a time
|
||||
func TestMultiWrite(t *testing.T) {
|
||||
if runtime.GOOS == "darwin" {
|
||||
link := "https://github.com/jbenet/go-ipfs/issues/147"
|
||||
t.Skipf("Skipping as is broken in OSX. See %s", link)
|
||||
}
|
||||
/*
|
||||
if runtime.GOOS == "darwin" {
|
||||
link := "https://github.com/jbenet/go-ipfs/issues/147"
|
||||
t.Skipf("Skipping as is broken in OSX. See %s", link)
|
||||
}
|
||||
*/
|
||||
|
||||
_, mnt := setupIpnsTest(t, nil)
|
||||
defer mnt.Close()
|
||||
|
@ -232,6 +232,9 @@ func (s *Node) Attr() fuse.Attr {
|
||||
log.Errorf("Error getting size of file: %s", err)
|
||||
size = 0
|
||||
}
|
||||
if size == 0 {
|
||||
size = s.dagMod.Size()
|
||||
}
|
||||
return fuse.Attr{
|
||||
Mode: 0666,
|
||||
Size: size,
|
||||
|
@ -173,6 +173,13 @@ func (dm *DagModifier) WriteAt(b []byte, offset uint64) (int, error) {
|
||||
return origlen, nil
|
||||
}
|
||||
|
||||
func (dm *DagModifier) Size() uint64 {
|
||||
if dm == nil {
|
||||
return 0
|
||||
}
|
||||
return dm.pbdata.GetFilesize()
|
||||
}
|
||||
|
||||
// splitBytes uses a splitterFunc to turn a large array of bytes
|
||||
// into many smaller arrays of bytes
|
||||
func splitBytes(b []byte, spl chunk.BlockSplitter) [][]byte {
|
||||
|
Reference in New Issue
Block a user