Skip to content

Commit 8e5cb1f

Browse files
committed
Allow for four part version numbers
The Open Ephys GUI is versioned with four components, which will not work for Julia's VersionNumber datatype. I have opted to truncate the fourth level (revision number) in Open Ephys data files, if it is used.
1 parent 81d6177 commit 8e5cb1f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/metadata.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,13 @@ struct OEInfo{T<:AbstractString}
223223
end
224224
function OEInfo(info_e::LightXML.XMLElement)
225225
ver_e = required_find_element(info_e, "VERSION")
226-
gui_version = VersionNumber(content(ver_e))
226+
ver_str = content(ver_e)
227+
ver_sections = split(ver_str, '.')
228+
if length(ver_sections) > 3
229+
gui_version = VersionNumber(join(ver_sections[1:3], '.'))
230+
else
231+
gui_version = VersionNumber(ver_str)
232+
end
227233
if gui_version > v"0.4.0"
228234
plugin_e = required_find_element(info_e, "PLUGIN_API_VERSION")
229235
plugin_api = VersionNumber(content(plugin_e))

0 commit comments

Comments
 (0)