Skip to content

Commit 661a2ed

Browse files
committed
fix reading variable names in mfiles with a subsystem entry
1 parent 693ea0d commit 661a2ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/MAT_HDF5.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Return a list of variables in an opened Matlab file.
275275
276276
See `matopen`.
277277
"""
278-
names(f::MatlabHDF5File) = filter!(x->x != "#refs#", names(f.plain))
278+
names(f::MatlabHDF5File) = filter!(x -> x!="#refs#" && x!="#subsystem#", names(f.plain))
279279

280280
"""
281281
exists(matfile_handle, varname) -> Bool

test/read.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ end
217217
# since we don't support these objects, just make sure that there are no errors
218218
# reading the file and that the variables are there and replaced with `missing`
219219
let objtestfile = "struct_table_datetime.mat"
220-
vars = matopen(m->read(m,"s"), joinpath(dirname(@__FILE__), "v7.3", objtestfile))
220+
vars = matread(joinpath(dirname(@__FILE__), "v7.3", objtestfile))["s"]
221221
@test "testTable" in keys(vars)
222222
@test ismissing(vars["testTable"])
223223
@test "testDatetime" in keys(vars)

0 commit comments

Comments
 (0)