Skip to content

Commit d5819a5

Browse files
committed
Check that file exists before trying to remove it (#2).
1 parent 520d90c commit d5819a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/FilestackSDK/Public/Models/FileLink.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public extension FileLink {
182182

183183
if let url = url {
184184
do {
185-
if FileManager.default.fileExists(atPath: destinationURL.absoluteString) {
185+
if FileManager.default.fileExists(atPath: destinationURL.path) {
186186
try FileManager.default.removeItem(at: destinationURL)
187187
}
188188

0 commit comments

Comments
 (0)