resolve issue in core data operations
This commit is contained in:
parent
068f5be807
commit
8d474677da
1 changed files with 1 additions and 1 deletions
|
|
@ -137,7 +137,7 @@ class PasswordStore {
|
|||
fm.enumerator(atPath: self.storeURL.path)?.forEach({ (e) in
|
||||
if let e = e as? String, let url = URL(string: e) {
|
||||
if url.pathExtension == "gpg" {
|
||||
let passwordEntity = PasswordEntity(context: context)
|
||||
let passwordEntity = NSEntityDescription.insertNewObject(forEntityName: "PasswordEntity", into: context) as! PasswordEntity
|
||||
let endIndex = url.lastPathComponent.index(url.lastPathComponent.endIndex, offsetBy: -4)
|
||||
passwordEntity.name = url.lastPathComponent.substring(to: endIndex)
|
||||
passwordEntity.rawPath = "\(url.path)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue