(arg *files.RelocationArg, metadata files.IsMetadata)
| 27 | } |
| 28 | |
| 29 | func newRelocationResultFromMetadata(arg *files.RelocationArg, metadata files.IsMetadata) (relocationResult, error) { |
| 30 | result, err := jsonMetadataFromDropbox(metadata) |
| 31 | if err != nil { |
| 32 | return relocationResult{}, err |
| 33 | } |
| 34 | result.PathDisplay = metadataDisplayPath(arg.ToPath, result.PathDisplay) |
| 35 | |
| 36 | return relocationResult{ |
| 37 | Input: relocationInput{ |
| 38 | FromPath: arg.FromPath, |
| 39 | ToPath: arg.ToPath, |
| 40 | }, |
| 41 | Result: result, |
| 42 | }, nil |
| 43 | } |
| 44 | |
| 45 | func relocationOperationResult(status string, result relocationResult) jsonOperationResult { |
| 46 | return newJSONOperationResult(status, result.Result.Type, result.Input, result.Result) |
no test coverage detected