openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
856 stars 210 forks source link

sparql "load" doesn't resolve absolute paths #613

Open mybyte opened 7 years ago

mybyte commented 7 years ago

It seems that "load file://C:/test.ttl" resolves to relative paths (virtuoso-opensource\vsp\C:\test.ttl) and "load file:///C:/test.ttl" tries to access "/C:/test.ttl" which is wrong too.

HughWilliams commented 7 years ago

Yes, with the sparql "load" function using the "file:" specifier such files should be placed or are referenced relative to the Web Server root folder i.e. "ServerRoot" INI file param.

IvanMikhailov commented 7 years ago

Yes I see the issue. There should be a separate BIF to convert URI to OS-specific path string. There's some code used for internals written on C, but no such for use in Virtuoso/PL.

There was one more issue with file://xxx on Windows: some Windows installations failed to deal with '/' in path strings, so from Virtuoso 5.x there's a conversion of '/' to '\'.

mybyte commented 7 years ago

@HughWilliams it worked in older Versions. Also, that still doesn't explain the conversion to /C:. That means it'd work on a Unix system just fine.