Skip to content

Commit

Permalink
Check that file exists before trying to remove it (#2).
Browse files Browse the repository at this point in the history
  • Loading branch information
rnine committed Jan 29, 2021
1 parent 520d90c commit d5819a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/FilestackSDK/Public/Models/FileLink.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public extension FileLink {

if let url = url {
do {
if FileManager.default.fileExists(atPath: destinationURL.absoluteString) {
if FileManager.default.fileExists(atPath: destinationURL.path) {
try FileManager.default.removeItem(at: destinationURL)
}

Expand Down

0 comments on commit d5819a5

Please sign in to comment.