os.exists() returns false when the file is a symlink that points to a file that does not exist. However, because the symlink itself exists, os.ln() will fail to create a symlink in it's place.
Expected Behavior
Current behavior is probably acceptable, but a note should be added to the documentation about this subtlety. os.islink() can be used to see that it is actually a symlink, but either a note to the documentation to clarify, or an argument to the function itself would be helpful.
Project Configuration
Just add this to a target and build (it will delete the file link)
Xmake Version
xmake v2.9.3+dev.1556ddbf9
Operating System Version and Architecture
Kubuntu 22.04
Describe Bug
os.exists()
returns false when the file is a symlink that points to a file that does not exist. However, because the symlink itself exists,os.ln()
will fail to create a symlink in it's place.Expected Behavior
Current behavior is probably acceptable, but a note should be added to the documentation about this subtlety.
os.islink()
can be used to see that it is actually a symlink, but either a note to the documentation to clarify, or an argument to the function itself would be helpful.Project Configuration
Just add this to a target and build (it will delete the file
link
)Additional Information and Error Logs
N/A