Fix migration of user defaults
This commit is contained in:
parent
826568226f
commit
0bb6e48d39
1 changed files with 6 additions and 1 deletions
|
|
@ -140,7 +140,12 @@ public class PasswordStore {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// migrate Defaults
|
// migrate Defaults
|
||||||
SharedDefaults = Defaults
|
let userDefaults = UserDefaults()
|
||||||
|
for key in Defaults.dictionaryRepresentation().keys {
|
||||||
|
if SharedDefaults.value(forKey: key) == nil {
|
||||||
|
SharedDefaults.setValue(userDefaults.value(forKey: key), forKey: key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// migrate files
|
// migrate files
|
||||||
try fm.createDirectory(atPath: Globals.documentPath, withIntermediateDirectories: true, attributes: nil)
|
try fm.createDirectory(atPath: Globals.documentPath, withIntermediateDirectories: true, attributes: nil)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue