Closed
Description
Version
v14.17.5
Platform
Win32NT 10.0.19043.0 Microsoft Windows NT 10.0.19043.0 x64
Subsystem
FS
What steps will reproduce the bug?
If you use fs.symlink under windows, if you don't use UAC, you will get an "operation not permitted" error.
But adding "type=junction" option can eliminate UAC, but only folders can correctly create soft links. The file will also be recognized as a folder, and the created soft link cannot be used.
fs.symlink('C:\\Users\\olereo\\Desktop\\me\\excel_file.xlsx','C:\\Users\\olereo\\Desktop\\me\\excel_file_sl.xlsx','junction',err=>console.log(err))
fs.symlink('C:\\Users\\olereo\\Desktop\\me\\text_file.txt','C:\\Users\\olereo\\Desktop\\me\\text_file_sl.txt','junction',err=>console.log(err))
fs.symlink('C:\\Users\\olereo\\Desktop\\me\\Folders','C:\\Users\\olereo\\Desktop\\me\\Folders_sl','junction',err=>console.log(err))
How often does it reproduce? Is there a required condition?
always
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response