Skip to content

path/filepath: Clean doesn't remove trailing backslash from Windows volume name #27791

@QtRoS

Description

@QtRoS

What version of Go are you using (go version)?

go 1.10.3 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

Windows 7, Core I7, x64

What did you do?

filepath.Clean(`\\somepath\dir\`)

What did you expect to see?

\\somepath\dir (without trailing slash as per documentation)

What did you see instead?

\\somepath\dir\ (with trailing shash)

Seems that problem is in two Windows slashes at the beginning, all other cases work just fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.OS-Windows

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions