Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNC config paths not supported #619

Closed
eidekrist opened this issue Oct 22, 2020 · 2 comments
Closed

UNC config paths not supported #619

eidekrist opened this issue Oct 22, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@eidekrist
Copy link
Member

Loading a config with for instance an OspSystemStructure.xml located on a server drive, such as

\\my.company\user\configuration

results in an error with the following message:

Could not create execution from OspSystemStructure.xml file: No resolvers available to handle URI: MyModel.fmu

@eidekrist eidekrist added the bug Something isn't working label Oct 22, 2020
@kyllingstad kyllingstad self-assigned this Feb 26, 2024
@kyllingstad
Copy link
Member

I've looked into this and figured out why it happens.

The system structure file path \\my.company\user\configuration\OspSystemStructure.xml becomes the file URI file://my.company/user/configuration/OspSystemStructure.xml. This is then used as the base URI for resolving model URI references, so MyModel.fmu becomes file://my.company/user/configuration/MyModel.fmu.

The problem is that fmu_file_uri_sub_resolver::lookup_model() deliberately rejects file URIs with a non-empty authority field (my.company in this case). The reason is that the interpretation of such a URI is not well defined. The file URI scheme simply says that the authority part should contain the fully qualified domain name of the host on which the file is located, but it leaves the access mechanism undefined. So the file could be on a network share, an FTP server, etc.

However, the standard interpretation on Windows is as a network share, which was the actual case presented here. So the fix I have in mind now is to remove the authority check on Windows and use this interpretation.

kyllingstad added a commit that referenced this issue Feb 26, 2024
kyllingstad added a commit that referenced this issue Feb 26, 2024
kyllingstad added a commit that referenced this issue Feb 28, 2024
@kyllingstad
Copy link
Member

Fixed by #755.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants