mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-28 02:45:58 +00:00
Various fixes
This commit is contained in:
parent
92eff4727a
commit
f8ebd4aa2f
@ -3087,6 +3087,8 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try? FileManager.default.createDirectory(atPath: draftPath(engine: self.context.engine), withIntermediateDirectories: true)
|
||||||
|
|
||||||
let isScopedResource = url.startAccessingSecurityScopedResource()
|
let isScopedResource = url.startAccessingSecurityScopedResource()
|
||||||
Logger.shared.log("MediaEditor", "isScopedResource = \(isScopedResource)")
|
Logger.shared.log("MediaEditor", "isScopedResource = \(isScopedResource)")
|
||||||
|
|
||||||
@ -3096,8 +3098,6 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
|
|||||||
let fileName = "audio_\(sourceUrl.lastPathComponent)"
|
let fileName = "audio_\(sourceUrl.lastPathComponent)"
|
||||||
let copyPath = fullDraftPath(peerId: self.context.account.peerId, path: fileName)
|
let copyPath = fullDraftPath(peerId: self.context.account.peerId, path: fileName)
|
||||||
|
|
||||||
Logger.shared.log("MediaEditor", "fileexists = \(FileManager.default.fileExists(atPath: sourceUrl.path))")
|
|
||||||
|
|
||||||
try? FileManager.default.removeItem(atPath: copyPath)
|
try? FileManager.default.removeItem(atPath: copyPath)
|
||||||
do {
|
do {
|
||||||
try FileManager.default.copyItem(at: sourceUrl, to: URL(fileURLWithPath: copyPath))
|
try FileManager.default.copyItem(at: sourceUrl, to: URL(fileURLWithPath: copyPath))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user