-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ipfs files cp <symlink> show "Error: symlinks not yet supported" #5302
Comments
@schomatis think you can figure out what's happening here? It looks MFS/dag related. |
Yes, on it. |
The problem happens when the file is being opened to be flushed (after it has been created). We already need to rewrite the entire flush logic (ipfs/go-mfs#3) but in the meanwhile I'll submit a PR wrapping the flush error as suggested by @NiKiZe so the user knows where is this coming from and close this issue. |
So with this version when running Since building IPFS makes me kind of uneasy, could someone run my above script on the fixed IPFS version and post the output? |
No, that wasn't fixed, I got hanged with the first error. |
We could just add another case in the command itself, but I rather solve this in |
@overbool What do you think? This could be resolved in a similar way to the |
@schomatis I think we could add a function like func (n *FSNode) TypeString() string {
switch n.format.GetType() {
case pb.Data_Directory, pb.Data_HAMTShard:
return "directory"
default:
return "file"
}
} |
just like you comment in #5217, we could replace to the follow code case *dag.ProtoNode:
d, err := ft.FSNodeFromBytes(n.Data())
if err != nil {
return nil, err
}
ndType := d.TypeString() |
This looks like it might already be done? |
Version information:
go-ipfs version: 0.4.15-
Repo version: 6
System version: amd64/linux
Golang version: go1.10.2
Latest stable in Gentoo
Also recreated with
go-ipfs version: 0.4.17-
Repo version: 7
System version: amd64/linux
Golang version: go1.10.3
Type:
Bug(s)
Description:
added QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn builds/20180410T010424Z
added QmVkg29SP2ZCc24HAcSCjCUd1gfP4u32EPsyNoo5nvr2aY builds
total 4.0K
drwxr-xr-x 2 distfiles distfiles 4.0K Jul 28 23:03 20180410T010424Z
lrwxrwxrwx 1 distfiles distfiles 16 Jul 28 23:03 latest -> 20180410T010424Z
added QmVhYBuGh6vKyQY3kP4ZH6m9jFvfzjCShs95pG6M9LUvc3 latest
0 B / ? [---------------------------------------------------------------------------------------------------------------------------------------------=]
Error: symlinks not yet supported
Note that we get an error message here ....
latest
20180410T010424Z
But here we can see that it was still added seemingly without issues
QmYde2c7rdNfPXwJcHKwfvfu4tLYa5fuAFg4kbtSHfzPaF
Size: 0
CumulativeSize: 152
ChildBlocks: 2
Type: directory
QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn
Size: 0
CumulativeSize: 4
ChildBlocks: 0
Type: directory
latest
Error: unrecognized node type: Symlink
Script found at zb2rhobUBn2cxPp3azT6saXfma7bzPAVyinrpnEszhkFKWCQs
From the above it seems that
Error: symlinks not yet supported
Should be removed when used withipfs files cp
since it does what it is supposed to? Or it should be changed to a Warning.When doing
ipfs files stat
on a symlink we getError: unrecognized node type: Symlink
- Even if a node type is unrecognized it should still output the same stats, especially the hash.So my suggestion is to move the error to after output, especially relevant if
--hash
was used.The text was updated successfully, but these errors were encountered: