mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 21:43:41 +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
|
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) {
|
if let bookmarkData = try? url.bookmarkData(options: bookmarkCreationOptions, includingResourceValuesForKeys: nil, relativeTo: nil) {
|
||||||
defaults.set(bookmarkData, forKey: bookmarkKey(url))
|
defaults.set(bookmarkData, forKey: bookmarkKey(url))
|
||||||
logger.info("saved bookmark for \(bookmarkKey(url))")
|
logger.info("saved bookmark for \(bookmarkKey(url))")
|
||||||
|
Loading…
Reference in New Issue
Block a user