MCPcopy Create free account
hub / github.com/dropbox/dbxcli / putDirectoryConflictError

Function putDirectoryConflictError

cmd/put.go:877–891  ·  view source on GitHub ↗
(dst string, err error)

Source from the content-addressed store, hash-verified

875}
876
877func 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
894var putCmd = &cobra.Command{

Callers 2

putDirectoryFunction · 0.85
putDirectoryWithResultFunction · 0.85

Calls 3

createFolderConflictTagFunction · 0.85
isConflictErrorFunction · 0.85

Tested by

no test coverage detected