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

Problem with FMI/FMU and external library due to Hopsan compiling on invalid folder #2205

Closed
dhilding opened this issue Mar 28, 2024 · 1 comment

Comments

@dhilding
Copy link

Description of the bug
When importing an FMU, Hopsan will compile the FMU in a folder "hopsan" that Hopsan creates in the Documents folder. The issue is that the on the present computer (this is common at companies) users Documents folder is either on an UNC path or on a OneDrive. The OneDrive can have (as in the present case) a path like "C:\Users\nilsnilsson\OneDrive - BIG Company, Inc". The compiler cannot handle this path. The same situation occurs when there is an UNC path for the Documents folder, as the compiler cannot handle the UNC path.

To Reproduce

  1. Install Hopsan on a computer where the users Documents folder is on the OneDrive or other Path containing "," and "-".
  2. Start Hopsan and import an FMU (or other external library).
  3. The compilation of FMU during import fails.

Expected behavior
Import of FMU or external library would be successful including the compilation.

Hopsan version (please complete the following information):
-OS: Windows 10
-Hopsan: 2.19.1, but older and newer are also affected.

  • Build: This is an official build downloaded from the web page

Additional information
Many thanks for a great software!
Suggestion: Would it be possible to add a check that the "hopsan" path does not contain "illegal" characters and if so is the case then ask the user to put the hopsan folder somewhere else? Alternatively also give the user control over where the "hopsan" folder is located through the GUI.

@robbr48
Copy link
Contributor

robbr48 commented May 27, 2024

This should no longer be an issue since we now use the FMIWrapper component for importing FMUs.

Related to #2202.

@robbr48 robbr48 closed this as completed May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants