mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 03:15:31 -04:00
Remove nested title including self
This commit is contained in:
parent
57b2f7c625
commit
663c0c0b38
@ -153,13 +153,15 @@ class Library
|
|||||||
title = @title_hash[title_id]
|
title = @title_hash[title_id]
|
||||||
existence = title.examine examine_context
|
existence = title.examine examine_context
|
||||||
unless existence
|
unless existence
|
||||||
examine_context["deleted_title_ids"].concat title.deep_titles.map &.id
|
examine_context["deleted_title_ids"].concat [title_id] + title.deep_titles.map &.id
|
||||||
examine_context["deleted_entry_ids"].concat title.deep_entries.map &.id
|
examine_context["deleted_entry_ids"].concat title.deep_entries.map &.id
|
||||||
@title_hash.delete title_id
|
|
||||||
end
|
end
|
||||||
existence
|
existence
|
||||||
end
|
end
|
||||||
remained_title_dirs = @title_ids.map { |id| title_hash[id].dir }
|
remained_title_dirs = @title_ids.map { |id| title_hash[id].dir }
|
||||||
|
examine_context["deleted_title_ids"].each do |title_id|
|
||||||
|
@title_hash.delete title_id
|
||||||
|
end
|
||||||
|
|
||||||
cache = examine_context["cached_contents_signature"]
|
cache = examine_context["cached_contents_signature"]
|
||||||
(Dir.entries @dir)
|
(Dir.entries @dir)
|
||||||
|
@ -102,9 +102,8 @@ class Title
|
|||||||
title = Library.default.get_title! title_id
|
title = Library.default.get_title! title_id
|
||||||
existence = title.examine context
|
existence = title.examine context
|
||||||
unless existence
|
unless existence
|
||||||
context["deleted_title_ids"].concat title.deep_titles.map &.id
|
context["deleted_title_ids"].concat [title_id] + title.deep_titles.map &.id
|
||||||
context["deleted_entry_ids"].concat title.deep_entries.map &.id
|
context["deleted_entry_ids"].concat title.deep_entries.map &.id
|
||||||
Library.default.title_hash.delete title_id
|
|
||||||
end
|
end
|
||||||
existence
|
existence
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user