The files.ToFile() function in tcp.goonly works when the input is a file, not a directory. We need to include additional logic so when a directory is detected, we generate it from the received fileNode. The files configuration will work when inside the directory there are only files but not directories.
The
files.ToFile()
function intcp.go
only works when the input is a file, not a directory. We need to include additional logic so when a directory is detected, we generate it from the receivedfileNode
. Thefiles
configuration will work when inside the directory there are only files but not directories.https://github.com/adlrocha/beyond-bitswap/blob/develop/testbed/utils/tcp.go#L104