Changeset - 21974e0ef0c4
[Not reviewed]
default
0 1 0
Drew Perttula - 12 years ago 2013-06-09 09:43:22
drewp@bigasterisk.com
guard against an abspath getting into a uri
Ignore-this: 95801647474b0a52e9ed429aaad2fbe0
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
bin/rdfdb
Show inline comments
 
@@ -246,6 +246,9 @@ class WatchedFiles(object):
 

	
 
    def uriFromFile(self, filename):
 
        assert filename.endswith('.n3'), filename
 
        if not any(filename.startswith(t) for t in self.topDirsToWatch):
 
            raise ValueError("filename %s doesn't start with any of %s" %
 
                             (filename, self.topDirsToWatch))
 
        return URIRef(self.topUri + filename[:-len('.n3')])
 

	
 
    def fileForUri(self, ctx):
0 comments (0 inline, 0 general)