@cryptotaxi247 / kubo / commits / 5ba7d616e

symlink handling in files ls

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Sep 2, 2015 at 12:57 UTC 5ba7d616e2f4d3cc46474a10a7c312406924ecb0
1 file changed +6 -3
core/commands/unixfs/ls.go
+6 -3
@@ -99,9 +99,6 @@ size is the IPFS link size.
99 }
100
101 switch t {
102 - default:
103 - res.SetError(fmt.Errorf("unrecognized type: %s", t), cmds.ErrImplementation)
104 - return
102 case unixfspb.Data_File:
103 break
104 case unixfspb.Data_Directory:
@@ -131,6 +128,12 @@ size is the IPFS link size.
128 }
129 links[i] = lsLink
130 }
131 + case unixfspb.Data_Symlink:
132 + res.SetError(fmt.Errorf("cannot list symlinks yet"), cmds.ErrNormal)
133 + return
134 + default:
135 + res.SetError(fmt.Errorf("unrecognized type: %s", t), cmds.ErrImplementation)
136 + return
137 }
138 }
139