Skip to content

Commit

Permalink
fix: Remove duplicated lines
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptGrv committed Oct 25, 2024
1 parent 3da622c commit 7466254
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions kDrive/UI/Controller/MainTabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -436,34 +436,3 @@ extension MainTabViewController: UpdateAccountDelegate {
}
}
}

// MARK: - UIDocumentPickerDelegate

extension MainTabViewController: UIDocumentPickerDelegate {
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
if let documentPicker = controller as? DriveImportDocumentPickerViewController {
for url in urls {
let targetURL = fileImportHelper.generateImportURL(for: url.uti)

do {
if FileManager.default.fileExists(atPath: targetURL.path) {
try FileManager.default.removeItem(at: targetURL)
}

try FileManager.default.moveItem(at: url, to: targetURL)
uploadQueue.saveToRealm(
UploadFile(
parentDirectoryId: documentPicker.importDriveDirectory.id,
userId: accountManager.currentUserId,
driveId: documentPicker.importDriveDirectory.driveId,
url: targetURL,
name: url.lastPathComponent
)
)
} catch {
UIConstants.showSnackBarIfNeeded(error: DriveError.unknownError)
}
}
}
}
}

0 comments on commit 7466254

Please sign in to comment.