mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Fix to pass 'make check', fix comments
This commit is contained in:
parent
7e36c91ea7
commit
bdbdf9c94b
@ -23,7 +23,9 @@ class Library
|
|||||||
|
|
||||||
Logger.debug "Load library instance"
|
Logger.debug "Load library instance"
|
||||||
zip_file = Compress::Zip::File.new instance_file_path
|
zip_file = Compress::Zip::File.new instance_file_path
|
||||||
instance_file = zip_file.entries.find { |entry| entry.filename == "instance.yml" }
|
instance_file = zip_file.entries.find do |entry|
|
||||||
|
entry.filename == "instance.yml"
|
||||||
|
end
|
||||||
|
|
||||||
if instance_file.nil?
|
if instance_file.nil?
|
||||||
zip_file.close
|
zip_file.close
|
||||||
|
@ -71,12 +71,12 @@ class Title
|
|||||||
end
|
end
|
||||||
|
|
||||||
def examine(cache = {} of String => String) : Bool
|
def examine(cache = {} of String => String) : Bool
|
||||||
return false unless Dir.exists? @dir # no title, should be removed
|
return false unless Dir.exists? @dir # No title, Remove this
|
||||||
contents_signature = Dir.contents_signature @dir, cache
|
contents_signature = Dir.contents_signature @dir, cache
|
||||||
# not changed, preserve
|
# Not changed. Reuse this
|
||||||
return true if @contents_signature == contents_signature
|
return true if @contents_signature == contents_signature
|
||||||
|
|
||||||
# fix title
|
# Fix title
|
||||||
@contents_signature = contents_signature
|
@contents_signature = contents_signature
|
||||||
@signature = Dir.signature @dir
|
@signature = Dir.signature @dir
|
||||||
storage = Storage.default
|
storage = Storage.default
|
||||||
@ -97,8 +97,8 @@ class Title
|
|||||||
title = Library.default.get_title! title_id
|
title = Library.default.get_title! title_id
|
||||||
title.examine cache
|
title.examine cache
|
||||||
end
|
end
|
||||||
remained_title_dirs = @title_ids.map do |id|
|
remained_title_dirs = @title_ids.map do |title_id|
|
||||||
title = Library.default.get_title! id
|
title = Library.default.get_title! title_id
|
||||||
title.dir
|
title.dir
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ class Title
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return true # this could be recycled
|
true # Fixed, reuse this
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_slim_json : String
|
def to_slim_json : String
|
||||||
|
Loading…
x
Reference in New Issue
Block a user