Remove unused elements (#530)

This commit is contained in:
Danny Moesch 2021-12-31 07:35:17 +01:00 committed by GitHub
parent ff6a1edf62
commit 819371f55e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 9 additions and 111 deletions

View file

@ -150,16 +150,6 @@ public class PasswordStore {
}
}
public func passwordEntityExisted(path: String) -> Bool {
let passwordEntityFetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "PasswordEntity")
do {
passwordEntityFetchRequest.predicate = NSPredicate(format: "path = %@", path)
return try context.count(for: passwordEntityFetchRequest) > 0
} catch {
fatalError("FailedToFetchPasswordEntities".localize(error))
}
}
public func getPasswordEntity(by path: String, isDir: Bool) -> PasswordEntity? {
let passwordEntityFetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "PasswordEntity")
do {
@ -383,8 +373,6 @@ public class PasswordStore {
return Self.dateFormatter.string(from: lastCommitDate)
}
public func updateRemoteRepo() {}
private func gitAdd(path: String) throws {
guard let storeRepository = storeRepository else {
throw AppError.repositoryNotSet
@ -738,7 +726,7 @@ public class PasswordStore {
}
}
public func findGPGID(from url: URL) -> String {
func findGPGID(from url: URL) -> String {
var path = url
while !FileManager.default.fileExists(atPath: path.appendingPathComponent(".gpg-id").path),
path.path != "file:///" {