exclude .gpg extension in password name
This commit is contained in:
parent
cb333e7bfb
commit
1964244427
1 changed files with 2 additions and 1 deletions
|
|
@ -105,7 +105,8 @@ class PasswordStore {
|
||||||
if let e = e as? String, let url = URL(string: e) {
|
if let e = e as? String, let url = URL(string: e) {
|
||||||
if url.pathExtension == "gpg" {
|
if url.pathExtension == "gpg" {
|
||||||
let entity = PasswordEntity(context: context)
|
let entity = PasswordEntity(context: context)
|
||||||
entity.name = url.lastPathComponent
|
let endIndex = url.lastPathComponent.index(url.lastPathComponent.endIndex, offsetBy: -4)
|
||||||
|
entity.name = url.lastPathComponent.substring(to: endIndex)
|
||||||
entity.rawPath = "password-store/\(url.absoluteString)"
|
entity.rawPath = "password-store/\(url.absoluteString)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue