Use is_valid?

This commit is contained in:
Alex Ling
2022-05-22 05:12:43 +00:00
parent 872e6dc6d6
commit e6dbeb623b
5 changed files with 21 additions and 8 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ class Title
Library.default.title_hash[title.id] = title
@title_ids << title.id
end
if DirEntry.validate_directory_entry path
if DirEntry.is_valid? path
entry = DirEntry.new path, self
@entries << entry if entry.pages > 0 || entry.err_msg
end
@@ -146,7 +146,7 @@ class Title
path = File.join dir, fn
if File.directory? path
unless remained_entry_paths.includes? path
if DirEntry.validate_directory_entry path
if DirEntry.is_valid? path
entry = DirEntry.new path, self
if entry.pages > 0 || entry.err_msg
@entries << entry