diff --git a/src/indexing.jl b/src/indexing.jl index ad89a85..e73633c 100644 --- a/src/indexing.jl +++ b/src/indexing.jl @@ -138,7 +138,7 @@ You can also work with it directly, say you wanted to get all checkpoints files 2: https://github.com/JuliaData/DataFrames.jl """ function index_checkpoint_files(dir::AbstractPath) - isdir(dir) || throw(ArgumentError(dir, "Need an existing directory.")) + isdir(dir) || throw(ArgumentError("Need an existing directory.")) map(Iterators.filter(==("jlso") ∘ extension, walkpath(dir))) do checkpoint_path return IndexEntry(checkpoint_path) end diff --git a/test/indexing.jl b/test/indexing.jl index 486014f..b224708 100644 --- a/test/indexing.jl +++ b/test/indexing.jl @@ -53,4 +53,8 @@ @test_throws ErrorException entry.tags end end + + @testset "nonexistent dir" begin + @test_throws ArgumentError index_checkpoint_files("nonexistent_dir") + end end