summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-09-26 12:52:54 -0400
committerDavid Robillard <d@drobilla.net>2016-09-26 12:52:54 -0400
commit4fa91364b545ccba013435f75a72b87e6eb63b87 (patch)
tree7b51c626519c02f3ab93ec4b863b68e440188153 /test
parent5dd6262310bd341df889ed090f47a3241ce93da0 (diff)
downloadlilv-4fa91364b545ccba013435f75a72b87e6eb63b87.tar.gz
lilv-4fa91364b545ccba013435f75a72b87e6eb63b87.tar.bz2
lilv-4fa91364b545ccba013435f75a72b87e6eb63b87.zip
Fix comparison of restored states with paths
Diffstat (limited to 'test')
-rw-r--r--test/test.lv2/test.c11
1 files changed, 8 insertions, 3 deletions
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");