-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
topic/filesTopic filesTopic files
Description
Symbolic links are not implemented. ipfs add -r on a directory containing a symlink to a directory will fail.
You can reproduce it using:
mkdir -p a/b
ln -s b a/c
touch a/b/c
ipfs add -r a
You get:
Error: Post http://127.0.0.1:5001/api/v0/add?encoding=json&r=true&stream-channels=true: read a/c: is a directory
I think I also got ipfs add -r to stop in the middle of adding because of that. At some point, it would just stop and not continue. Running stat, I found that it thought that the symlink to a directory was a file, and tried to read it:
open("root/ckeditor/plugins/openlink", O_RDONLY|O_CLOEXEC) = 5
read(5, 0xc208130000, 32768) = -1 EISDIR (Is a directory)
epoll_wait(4, {}, 128, 0) = 0
futex(0xf2e878, FUTEX_WAIT, 0, NULL) = 0
futex(0xf2da30, FUTEX_WAKE, 1) = 1
...
The normal sequence for a directory would be:
open("root/ckeditor/plugins/newpage/lang", O_RDONLY|O_CLOEXEC) = 5
getdents64(5, /* 68 entries */, 4096) = 2160
getdents64(5, /* 0 entries */, 4096) = 0
lstat("root/ckeditor/plugins/newpage/lang/fa.js", {st_mode=S_IFREG|0644, st_size=235, ...}) = 0
...
We should implement symbolic links in the unixfs protocol buffer object.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
topic/filesTopic filesTopic files