This commit is contained in:
Alex Ling
2020-02-14 00:57:39 +00:00
parent 83f6fc25f0
commit 042df2bf1f
10 changed files with 162 additions and 40 deletions

View File

@@ -79,7 +79,7 @@ class Library
def initialize(dir : String)
@dir = dir
unless Dir.exists? dir
abort "ERROR: The library directory #{dir} does not exist"
Dir.mkdir_p dir
end
@titles = (Dir.entries dir)
.select! { |path| File.directory? File.join dir, path }