Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
[DOCS] Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardo-ferreira07 committed Oct 18, 2021
1 parent 4e988a6 commit f378791
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/dotLottieLoader/DotLottieCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ public struct DotLottieCreator {
/// - saveUrl: Local file URL to persist
/// - completion: Local URL
private static func download(from url: URL, to saveUrl: URL, completion: @escaping (Bool) -> Void) {
// file is not remote, so just return
/// file is not remote, save the animation content to the proper same URL and return
guard url.isRemoteFile else {
let animationData = try? Data(contentsOf: url)
do {
try animationData?.write(to: saveUrl)
completion(true)
return
} catch {
DotLottieUtils.log("Failed to save downloaded data: \(error.localizedDescription)")
DotLottieUtils.log("Failed to save animation data: \(error.localizedDescription)")
completion(false)
return
}
Expand Down

0 comments on commit f378791

Please sign in to comment.