Skip to content

Preview fails on all UNC paths: ArgumentException "Illegal characters in path" (mapped drive works) #2012

Description

@18734860425yt-a11y

Environment: QuickLook 4.5.0 (GitHub release), Windows 10.0.19041.2

Steps to reproduce:

  1. Open any folder on an SMB network share in File Explorer, e.g. \server\share\folder
  2. Select an image file (e.g. .png) and press Spacebar
  3. QuickLook shows the fallback info card (path/size/date) instead of the image preview
  4. 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 Error when previewing image/video/HTML files in WSL #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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions