Commit cb001817 authored by Siebers, Michael's avatar Siebers, Michael
Browse files

update item type definition

The previous definition could result in unexpected errors.
The previous oneof(...) throws an instantiation error
when the parsed term is not ground. This may happen for example
when a JSON object is parsed to a dict (tag is a variable).
The replacement has the same semantical meaning but avoids
throwing an instantiation exception when applied on a dict.
parent db3d76bb
......@@ -76,7 +76,7 @@ item_type(anyof([DirectoryType,FileType])) :-
creation_time: integer
],
FileType = dict([
type:oneof([file]),
type: atom('^file$'),
file_size: positive_integer,
media_type: atom,
filename_extension: atom,
......@@ -85,4 +85,4 @@ item_type(anyof([DirectoryType,FileType])) :-
change_time: integer
| CommonKeys
]),
DirectoryType = dict([type:oneof([directory])|CommonKeys]).
DirectoryType = dict([type:atom('^directory$')|CommonKeys]).
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment