Creating a new instance import from launcher recursive copy operation follows file system soft links
Please confirm the following.
- [x] I checked the existing issues for duplicate problems
- [x] I have tried resolving the issue using the support portal
- [x] I have ensured my Modrinth App installation is up to date
What version of the Modrinth App are you using?
0.9.3 (20250206.213246)
What operating systems are you seeing the problem on?
MacOS
Describe the bug
When creating a new instance using the import from launcher mode, the recursive copy operation follows file system soft links.
Depending on the link followed, this can result in a never-ending copy/import procedure, where the import operation tries to continue to traverse the instance file tree through any linked directories, as if it were just a regular directory.
After the import started taking so long, I checked to see how large the imported instance was, and it was nearing 5GB. I then realized that the importer had resolved a linked directory into an actual directory in the Modrinth-imported instance.
Steps to reproduce
- Ensure that one's original instance has a soft-link in its file tree to a directory higher up in the tree.
- Click the
Create new instancebutton. - Check the
Import From Launcheroption button. - Check
PrismLauncheroption button (for example). - Select a Profile like
1.21.1(for example). - Click the
Import 1 profilesbutton.
Expected behavior
Either:
- The soft link is recreated to a relatively correct location (in the new instance file tree), or
- the procedure aborts and requests the user to eliminate the soft link, or
- the soft link is skipped altogether.
In any case, the soft link should not be recreated as an actual directory, and its contents copied.
Additional context
No response