Set isDir to false in core data

This commit is contained in:
Bob Sun 2017-03-02 15:32:40 +08:00
parent f3497cdc0f
commit 43b71f2704
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4
2 changed files with 2 additions and 1 deletions

View file

@ -500,6 +500,7 @@ class PasswordStore {
passwordEntity.path = "\(password.name).gpg"
passwordEntity.parent = nil
passwordEntity.synced = false
passwordEntity.isDir = false
try context.save()
print(saveURL.path)
let _ = createAddCommitInRepository(message: "Add new password by pass for iOS", fileData: encryptedData, filename: saveURL.lastPathComponent, progressBlock: progressBlock)

View file

@ -2,7 +2,7 @@
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="12124.1" systemVersion="16E175b" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="PasswordEntity" representedClassName="PasswordEntity" syncable="YES" codeGenerationType="class">
<attribute name="image" optional="YES" attributeType="Binary" allowsExternalBinaryDataStorage="YES" syncable="YES"/>
<attribute name="isDir" attributeType="Boolean" usesScalarValueType="YES" syncable="YES"/>
<attribute name="isDir" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
<attribute name="name" attributeType="String" syncable="YES"/>
<attribute name="path" attributeType="String" syncable="YES"/>
<attribute name="synced" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>