From 4fa91364b545ccba013435f75a72b87e6eb63b87 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 26 Sep 2016 12:52:54 -0400 Subject: Fix comparison of restored states with paths --- test/test.lv2/test.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/test.lv2') diff --git a/test/test.lv2/test.c b/test/test.lv2/test.c index 27344e7..37d29c1 100644 --- a/test/test.lv2/test.c +++ b/test/test.lv2/test.c @@ -247,7 +247,7 @@ save(LV2_Handle instance, apath, strlen(apath) + 1, map_uri(plugin, LV2_ATOM__Path), - LV2_STATE_IS_PORTABLE); + LV2_STATE_IS_POD); free(apath); free(apath2); @@ -262,7 +262,7 @@ save(LV2_Handle instance, apath, strlen(apath) + 1, map_uri(plugin, LV2_ATOM__Path), - LV2_STATE_IS_PORTABLE); + LV2_STATE_IS_POD); free(apath); } @@ -279,7 +279,7 @@ save(LV2_Handle instance, apath, strlen(apath) + 1, map_uri(plugin, LV2_ATOM__Path), - LV2_STATE_IS_PORTABLE); + LV2_STATE_IS_POD); free(apath); free(spath); } @@ -322,6 +322,11 @@ restore(LV2_Handle instance, map_uri(plugin, "http://example.org/extfile"), &size, &type, &valflags); + if (valflags != LV2_STATE_IS_POD) { + fprintf(stderr, "error: Restored bad file flags\n"); + return LV2_STATE_ERR_BAD_FLAGS; + } + if (apath) { char* path = map_path->absolute_path(map_path->handle, apath); FILE* f = fopen(path, "r"); -- cgit v1.2.1