Listing directories under files should be reported back to user, and vice versa.
(Alternatively, we can respect both, so if a user uses only files and puts directories there, we can "silently" accept them. This is something that could pave the way towards using only one directive in the future.)
BTW, regarding listing files and directories "unnecessarily", I have another observation. If a uses specifies the same file twice, it'll be uploaded twice, for example:
$ reana-client run -w test
...
==> Uploading files...
==> Detected .gitignore file. Some files might get ignored.
==> SUCCESS: File /code/gendata.C was successfully uploaded.
==> SUCCESS: File /code/gendata.C was successfully uploaded.
==> SUCCESS: File /code/gendata.C was successfully uploaded.
==> SUCCESS: File /code/gendata.C was successfully uploaded.
==> SUCCESS: File /code/gendata.C was successfully uploaded.
==> SUCCESS: File /code/gendata.C was successfully uploaded.
==> SUCCESS: File /code/fitdata.C was successfully uploaded.
==> Starting workflow...
It would be nice to first make a list of all user-desired files and directories and walk through them, collect all the uploadable objects (avoiding symlinks), and then make a set out of them, so that we don't do any unnecessary upload the same object many times.
Listing directories under
files
should be reported back to user, and vice versa.(Alternatively, we can respect both, so if a user uses only
files
and puts directories there, we can "silently" accept them. This is something that could pave the way towards using only one directive in the future.)BTW, regarding listing files and directories "unnecessarily", I have another observation. If a uses specifies the same file twice, it'll be uploaded twice, for example:
leads to:
It would be nice to first make a list of all user-desired files and directories and walk through them, collect all the uploadable objects (avoiding symlinks), and then make a set out of them, so that we don't do any unnecessary upload the same object many times.
_Originally posted by @tiborsimko in https://github.com/reanahub/reana-client-go/pull/133#discussion_r982097814_