diff --git a/src/copy.c b/src/copy.c index 65cf65895..b1e4557e4 100644 --- a/src/copy.c +++ b/src/copy.c @@ -2477,9 +2477,18 @@ copy_internal (char const *src_name, char const *dst_name, If the permissions on the directory containing the source or destination file are made too restrictive, the rename will fail. Etc. */ - error (0, rename_errno, - _("cannot move %s to %s"), - quoteaf_n (0, src_name), quoteaf_n (1, dst_name)); + switch (errno) + { + case EDQUOT: case EEXIST: case EISDIR: case ENOSPC: case ENOTEMPTY: + error (0, rename_errno, "%s", quotearg_colon (dst_name)); + break; + + default: + error (0, rename_errno, + _("cannot move %s to %s"), + quoteaf_n (0, src_name), quoteaf_n (1, dst_name)); + break; + } forget_created (src_sb.st_ino, src_sb.st_dev); return false; }