I keep my sketches on my main system in a folder F:\Dev\Arduino. However, to maintain a consistent setup with other systems (e.g. my laptop), I access it via a junction at C:\Etc\Dev\ which points to F:\Dev. This allows me to access the sketches at C:\Etc\Dev\Arduino. This is because the laptop only has one drive, so sketches have to live in C:\Etc\Dev\Arduino.
The problem is that when I build a sketch with arduino-cli, even though I specify the sketch folder as C:\Etc\Dev\Arduino\Sketchname, errors are all reported as F:\Dev\Arduino\Sketchname\filename.cpp ... What's happened is that Arduino-cli has resolved the junction and has printed the true name of the file, rather than the apparent name as seen from C:\Etc\Dev...
This causes all sorts of problems since the editing tools have the files open with their names based from C:\Etc\Dev, but when I double click on the error message, it opens a second copy of the same file using the name based at F:\Dev... As I'm sure you can understand, having the same file open in two different tabs in the editing tool causes all sorts of trouble since changes written via one tab can overwrite changes made in the other.
Generally a very bad situation.
Is there some way to turn off the "auto-resolution" of junction paths, and just leave them as the apparent path on C: when printing errors?