aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-04 00:49:48 +0000
committerDavid Robillard <d@drobilla.net>2011-11-04 00:49:48 +0000
commit1c80ffdd50c201e15a913759e3acb58ff08be5b8 (patch)
tree0e69f0252a5723736add80962373195d62bb9086 /lv2specgen
parentba750d19fc2e37ddbb28e66a36d8dce10f5c404c (diff)
downloadlv2-1c80ffdd50c201e15a913759e3acb58ff08be5b8.tar.xz
Fix seeAlso link to ttl file.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-xlv2specgen/lv2specgen.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 404545f..0b4f77e 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -976,11 +976,16 @@ def specgen(specloc, docdir, template, doclinks, instances=False, mode="spec"):
#other_files += '<li><a href="%s">Ontology</a> %s</li>\n' % (filename, filename)
+ abs_bundle_path = os.path.abspath(bundle_path)
see_also_files = specProperties(m, spec_url, rdfs.seeAlso)
for f in see_also_files:
uri = str(f)
- if uri[0:5] == 'file:':
- uri = uri[5:]
+ if uri[:7] == 'file://':
+ uri = uri[7:]
+ if uri[:len(abs_bundle_path)] == abs_bundle_path:
+ uri = uri[len(abs_bundle_path) + 1:]
+ else:
+ print("warning: seeAlso file outside bundle: %s" % uri)
other_files += ', <a href="%s">%s</a>' % (uri, uri)