Skip to content

Commit

Permalink
fixed a compiler error. Untested…
Browse files Browse the repository at this point in the history
  • Loading branch information
achimb committed Feb 5, 2019
1 parent 8acaa57 commit 6cc84c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BXSwiftUtils/Files/URL+Resolving.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ public extension URL

// On macOS we can convert to a bookmark and then resolve that

if let bookmarkRef = CFURLCreateBookmarkDataFromAliasRecord(kCFAllocatorDefault,aliasData as CFData)
if let bookmarkRef = CFURLCreateBookmarkDataFromAliasRecord(kCFAllocatorDefault,aliasData as CFData) // returns a "Unmanaged<CFData>!"
{
let bookmarkData = bookmarkRef.takeRetainedValue() as Data
defer { bookmarkRef?.release() }
defer { bookmarkRef.release() }
var isStale = false
return try URL(resolvingBookmarkData:bookmarkData, options:[.withoutUI,.withoutMounting], relativeTo:nil, bookmarkDataIsStale:&isStale)
}

return nil

#endif
}

Expand Down

0 comments on commit 6cc84c0

Please sign in to comment.