Preview fails on all UNC paths: ArgumentException "Illegal characters in path" (mapped drive works)
Author: 18734860425yt-a11yCreated Sep 28, 2026Updated Sep 28, 2026
Environment: QuickLook 4.5.0 (GitHub release), Windows 10.0.19041.2
Steps to reproduce:
- Open any folder on an SMB network share in File Explorer, e.g. \server\share\folder
- Select an image file (e.g. .png) and press Spacebar
- QuickLook shows the fallback info card (path/size/date) instead of the image preview
- Pressing Spacebar again may show an error dialog: System.ArgumentException: Illegal characters in path
Stack trace (from the error dialog, ResolveShortcut → Path.CheckInvalidPathChars):
System.ArgumentException: 路径中具有非法字符。 在 System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) 在 System.IO.Path.GetExtension(String path) 在 QuickLook.Plugin.QuickLook.Plugin.ResolveShortcut(String path) 在 QuickLook.ViewWindowManager.TogglePreview(String path, Boolean isFromPipe)
Findings:
- Fails with all UNC forms: \server.domain\share, \shortname\share, and \10.x.x.x\share
- The exact same files preview correctly when the share is accessed via a mapped drive letter (Z:...)
- Local files preview correctly
- Possibly related to #617 (UriFormatException on \wsl$... — also UNC-path parsing, different exception)
Expected: files on UNC paths should preview like local ones; at minimum, ArgumentException should be caught in ResolveShortcut.
Source: QL-Win/QuickLook