Skip to content

IDEasy cannot create link to file on Windows #1477

@hohwille

Description

@hohwille

Actual behavior

On Windows IDEasy uses mklink as a fallback to create links.
However, for files this does not work:

if (!Files.isDirectory(fallbackPath)) { // if source is a junction. This returns true as well.
throw new IllegalStateException(
"These junctions can only point to directories or other junctions. Please make sure that the source (" + fallbackPath + ") is one of these.");
}

Reproduce

see above linked code

Expected behavior

Also files should be valid link targets so a link to a file should be created on Windows without errors.

IDEasy status

$ ide -p status
Skipping git fetch on D:/projects/project/settings because we are offline.
IDE_ROOT is set to D:/projects
IDE_HOME is set to D:/projects/project
You are offline. Check your internet connection and potential proxy settings.
Your settings are up-to-date.
Your version of IDEasy is 2025.08.001.
Skipping check for newer version of IDEasy because you are offline.
Your operating system is windows(10.0)@x64 [Windows 11@amd64]
Successfully completed ide (status)

Related/Dependent issues

#82

Comments/Hints

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions