Skip to content

Commit

Permalink
πŸ”§ μž„μ‹œ fix
Browse files Browse the repository at this point in the history
anyukyung committed Nov 30, 2023
1 parent 68faf3d commit b6cf138
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions iOS/Layover/Layover/Scenes/Home/HomeRouter.swift
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@ class HomeRouter: NSObject, HomeRoutingLogic, HomeDataPassing {

// Data Passing
destination.videoURL = videoURL
viewController?.hidesBottomBarWhenPushed = true
viewController?.navigationController?.pushViewController(nextViewController, animated: true)
}

8 changes: 4 additions & 4 deletions iOS/Layover/Layover/Workers/VideoFileWorker.swift
Original file line number Diff line number Diff line change
@@ -36,14 +36,14 @@ final class VideoFileWorker: VideoFileWorkerProtocol {
// MARK: - Methods

func copyToNewURL(at videoURL: URL) -> URL? {
let temporaryDirectory = FileManager.default.temporaryDirectory
let fileName = "\(directoryPath)/\(fileName).\(videoURL.pathExtension)"
let newURL = temporaryDirectory.appending(path: fileName)
let temporaryDirectory = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0]
let path = "\(directoryPath)/\(fileName).\(videoURL.pathExtension)"
let newURL = temporaryDirectory.appending(path: path)
do {
if fileManager.fileExists(atPath: newURL.path()) {
delete(at: newURL)
}
try FileManager.default.copyItem(at: videoURL as URL, to: newURL)
try fileManager.copyItem(at: videoURL as URL, to: newURL)
return newURL
} catch {
os_log(.error, log: .data, "%@", error.localizedDescription)

0 comments on commit b6cf138

Please sign in to comment.