https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115189
--- Comment #7 from Tomas Kalibera <tomas.kalibera at gmail dot com> --- (In reply to Bill Zissimopoulos from comment #6) > > I can reproduce the problem with "subst" and with the Windows Explorer > > ("File/Map network drive"). I assume the is the usual way to map network > > drives. > > The usual way to map network drives is indeed "Map network drive", but > GetFinalPathNameByHandleW should work with those. I am surprised that it > does not, unless the problem you are experiencing is not related to > GetFinalPathNameByHandleW after all. I am testing using lrealpath.c from libiberty (gcc 13.3), instrumented to make sure GetFinalPathNameByHandle is called and seeing what it returned. It returns UNC paths (\\server\share) for mapped network drives. I've tried with a regular samba network share in addition to the RDP share, the result is the same. On Windows 10 Pro, Version 10.0.19045 Build 19045.