Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ package struct WireDriveRenameNodeUseCase: WireDriveRenameNodeUseCaseProtocol {
targetPath = directory.appendingPathComponent("\(newFilename).\(pathExtension)")
}

let path = targetPath.absoluteString.removingPercentEncoding ?? targetPath.absoluteString

// Checks whether the path doesn't already exist.
let preCheckResult = try await nodesRepository.preCheck(
nodePath: targetPath.absoluteString,
nodePath: path,
findAvailablePath: false
)

Expand All @@ -81,7 +83,7 @@ package struct WireDriveRenameNodeUseCase: WireDriveRenameNodeUseCaseProtocol {
// Renames the file on the server.
let didRenameFile = try await nodesRepository.renameNode(
nodeID: nodeID,
targetPath: targetPath.absoluteString
targetPath: path
)

guard didRenameFile else {
Expand Down
Loading