Closed ahmethakanbesel closed 1 year ago
I do not remember if we ever discussed this but what about outputting some warnings to users?
For example; a
cp
to a single fifo file exits with 0 without any output which kinda indicates like if it would successfully copied;~/src/github.com/peak/s5cmd fix-special-files* ; file fifoo fifoo: fifo (named pipe) ~/src/github.com/peak/s5cmd fix-special-files* ; s5cmd cp fifoo s3://some-bucket/selman/test/; echo $? 0 ~/src/github.com/peak/s5cmd fix-special-files* ; s5cmd ls 's3://some-bucket/selman/test/*' ERROR "ls s3://some-bucket/selman/test/*": no object found
What do you think @ilkinulas?
I added error messages for skipped objects. It can be good to show information messages. I can revert if it is unnecessary. https://github.com/peak/s5cmd/pull/618/commits/da3ccd44ed37ae66b0ac5465acc6ff8ae14c1ad1
Resolves #498
Changes are made:
cp
command checks file mode bits before trying to copy. If the file is a special file,cp
do not copy that file. It neither returns an error nor prints a message. The copy process continues as usual.sync
usescp
in the background, it behaves likecp
, so it does not sync special files.