code icon indicating copy to clipboard operation
code copied to clipboard

Creating a new instance import from launcher recursive copy operation follows file system soft links

Open nelsnelson opened this issue 9 months ago • 0 comments

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

  1. Ensure that one's original instance has a soft-link in its file tree to a directory higher up in the tree.
  2. Click the Create new instance button.
  3. Check the Import From Launcher option button.
  4. Check PrismLauncher option button (for example).
  5. Select a Profile like 1.21.1 (for example).
  6. Click the Import 1 profiles button.

Expected behavior

Either:

  1. The soft link is recreated to a relatively correct location (in the new instance file tree), or
  2. the procedure aborts and requests the user to eliminate the soft link, or
  3. 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

nelsnelson avatar Mar 29 '25 13:03 nelsnelson