mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 00:08:21 +00:00
Don't try save bookmarks for remote URLs
This commit is contained in:
parent
53620c4d35
commit
e8515d63e3
@ -23,6 +23,11 @@ struct URLBookmarkModel {
|
||||
return
|
||||
}
|
||||
|
||||
guard url.isFileURL else {
|
||||
logger.error("trying to save bookmark for something that is not a file")
|
||||
return
|
||||
}
|
||||
|
||||
if let bookmarkData = try? url.bookmarkData(options: bookmarkCreationOptions, includingResourceValuesForKeys: nil, relativeTo: nil) {
|
||||
defaults.set(bookmarkData, forKey: bookmarkKey(url))
|
||||
logger.info("saved bookmark for \(bookmarkKey(url))")
|
||||
|
Loading…
Reference in New Issue
Block a user