Fix id of Items, saving
This commit is contained in:
@ -37,11 +37,11 @@ class Tag: Item, LocalizedItem {
|
||||
|
||||
@discardableResult
|
||||
func update(id newId: String) -> Bool {
|
||||
guard content.storage.move(tag: id, to: newId) else {
|
||||
print("Failed to move files of tag \(id)")
|
||||
guard content.storage.move(tag: identifier, to: newId) else {
|
||||
print("Failed to move files of tag \(identifier)")
|
||||
return false
|
||||
}
|
||||
id = newId
|
||||
identifier = newId
|
||||
return true
|
||||
}
|
||||
|
||||
@ -106,6 +106,6 @@ extension Tag: StorageItem {
|
||||
}
|
||||
|
||||
func saveToDisk(_ data: Data) -> Bool {
|
||||
content.storage.save(tag: data, for: id)
|
||||
content.storage.save(tag: data, for: identifier)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user