Skip to content

tauri-plugin-opener bug - revealItemInDir fails for UNC network paths on Windows #3304

@feltz916

Description

@feltz916

Describe the bug

revealItemInDir fails on Windows when given a UNC network path (e.g., \server\share\file.mkv) with:

Failed to convert path '\?\UNC\server\share\filename.ext' to ITEMIDLIST

Cause: Canonicalization in reveal_item_in_dir.rs (lines 13 and 51) converts UNC paths to \?\UNC... format. The \?\ prefix is stripped for local drives but not for UNC paths. The prefixed path is then passed to ILCreateFromPathW, which doesn't support \?\ prefixes and returns NULL.

I fixed this locally by stripping the \?\UNC\ prefix back to \ after canonicalization, before passing to ILCreateFromPathW. Affects both reveal_item_in_dir (line 13) and reveal_items_in_dir (line 51).

Environment: Plugin 2.5.3, Windows 11, SMB network paths

Reproduction

No response

Expected behavior

No response

Full tauri info output

Failed to convert path '\\?\UNC\server\share\filename.ext' to ITEMIDLIST

Stack trace


Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions