-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command: skip nonregular files #618
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.