Skip to content
Snippets Groups Projects
Commit 2b047cf6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't populate metadata property unless there is metadata

Or detail level is MAX.
parent 1c96d408
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2161 passed
......@@ -291,7 +291,7 @@ set_file_properties(JSContext *cx, JSObject* obj, file_t* f, enum file_detail de
return false;
}
if(((f->content != NULL && *f->content != '\0') || detail >= file_detail_content)
if(((f->content != NULL && *f->content != '\0') || detail > file_detail_content)
&& ((js_str = JS_NewStringCopyZ(cx, f->content)) == NULL
|| !JS_DefineProperty(cx, obj, "metadata", STRING_TO_JSVAL(js_str), NULL, NULL, flags)))
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment