| 604 | } |
| 605 | |
| 606 | void start() { |
| 607 | // We need this explicit check here because moving directories is more complicated, |
| 608 | // and therefore we do it in another transaction type entirely. |
| 609 | if (req.targetId.type() == InodeType::DIRECTORY) { |
| 610 | env.finishWithError(TernError::TYPE_IS_NOT_DIRECTORY); |
| 611 | } else if (req.oldOwnerId == req.newOwnerId) { |
| 612 | env.finishWithError(TernError::SAME_DIRECTORIES); |
| 613 | } else { |
| 614 | lockOldEdge(); |
| 615 | } |
| 616 | } |
| 617 | |
| 618 | void lockOldEdge(bool repeated = false) { |
| 619 | auto& shardReq = env.needsShard(RENAME_FILE_LOCK_OLD_EDGE, req.oldOwnerId.shard(), repeated).setLockCurrentEdge(); |
no test coverage detected