236814e07bd0 — Chris Cannam 11 years ago
Actually, I think we have to do percent encoding ourselves (QUrls converted to strings are de-encoded)
2 files changed, 5 insertions(+), 4 deletions(-)

M dataquay/BasicStore.h
M src/backend/BasicStoreSord.cpp
M dataquay/BasicStore.h +2 -3
@@ 128,9 128,8 @@ public:
      * exceptions.
      *
      * Note that the URL must be a URL, not just a filename
-     * (i.e. local files need the file: prefix, and spaces and the
-     * characters '<' or '>' must be percent encoded). The file URL
-     * will also become the base URI of the store.
+     * (i.e. local files need the file: prefix). The file URL will
+     * also become the base URI of the store.
      *
      * If format is specified, it will be taken as the RDF parse
      * format (e.g. ntriples).  The set of supported format strings

          
M src/backend/BasicStoreSord.cpp +3 -1
@@ 967,7 967,9 @@ BasicStore *
 BasicStore::load(QUrl url, QString format)
 {
     BasicStore *s = new BasicStore();
-    s->setBaseUri(Uri(url));
+    QString su = url.toString();
+    Uri baseUri(su.replace(" ", "%20"));
+    s->setBaseUri(baseUri);
     // store is empty, ImportIgnoreDuplicates is faster
     s->import(url, ImportIgnoreDuplicates, format);
     return s;