Skip to content

Commit

Permalink
disable Pixel for Safari Bookmarks.plist read permission request (#2098)
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx authored Jan 22, 2024
1 parent 68b1114 commit 2b8fc22
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ final class SafariDataImporter: DataImporter {
}
}

static private let bookmarksFileName = "Bookmarks.plist"
static let bookmarksFileName = "Bookmarks.plist"

private var fileUrl: URL {
profile.profileURL.appendingPathComponent(Self.bookmarksFileName)
Expand Down
5 changes: 4 additions & 1 deletion DuckDuckGo/DataImport/Model/DataImportViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ struct DataImportViewModel {
break
}
log("file read no permission for \(url.path)")
Pixel.fire(.dataImportFailed(source: importSource, sourceVersion: importSource.installedAppsMajorVersionDescription(selectedProfile: selectedProfile), error: importError))

if url != selectedProfile?.profileURL.appendingPathComponent(SafariDataImporter.bookmarksFileName) {
Pixel.fire(.dataImportFailed(source: importSource, sourceVersion: importSource.installedAppsMajorVersionDescription(selectedProfile: selectedProfile), error: importError))
}
screen = .getReadPermission(url)
return true

Expand Down

0 comments on commit 2b8fc22

Please sign in to comment.