Skip to content

Commit

Permalink
fix reading variable names in mfiles with a subsystem entry
Browse files Browse the repository at this point in the history
  • Loading branch information
jebej committed Apr 28, 2020
1 parent 1a2bee6 commit 613f158
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MAT_HDF5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Return a list of variables in an opened Matlab file.
See `matopen`.
"""
names(f::MatlabHDF5File) = filter!(x->x != "#refs#", names(f.plain))
names(f::MatlabHDF5File) = filter!(x -> x!="#refs#" && x!="#subsystem#", names(f.plain))

"""
exists(matfile_handle, varname) -> Bool
Expand Down
2 changes: 1 addition & 1 deletion test/read.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ end
# since we don't support these objects, just make sure that there are no errors
# reading the file and that the variables are there and replaced with `missing`
let objtestfile = "struct_table_datetime.mat"
vars = matopen(m->read(m,"s"), joinpath(dirname(@__FILE__), "v7.3", objtestfile))
vars = matread(joinpath(dirname(@__FILE__), "v7.3", objtestfile))["s"]
@test "testTable" in keys(vars)
@test ismissing(vars["testTable"])
@test "testDatetime" in keys(vars)
Expand Down

0 comments on commit 613f158

Please sign in to comment.