(dst string, err error)
| 875 | } |
| 876 | |
| 877 | func putDirectoryConflictError(dst string, err error) error { |
| 878 | conflictTag, ok := createFolderConflictTag(err) |
| 879 | switch { |
| 880 | case ok && conflictTag == files.WriteConflictErrorFolder: |
| 881 | return nil |
| 882 | case ok && (conflictTag == files.WriteConflictErrorFile || conflictTag == files.WriteConflictErrorFileAncestor): |
| 883 | return pathConflictErrorWithPath(dst, "path exists and is not a folder: %s", dst) |
| 884 | case ok: |
| 885 | return err |
| 886 | case isConflictError(err): |
| 887 | return nil |
| 888 | default: |
| 889 | return err |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | // putCmd represents the put command |
| 894 | var putCmd = &cobra.Command{ |
no test coverage detected