Skip to content

Excessive forward slash after path.normpath #506

@duselguy

Description

@duselguy

Linux
Lua 5.4.6
penlight 1.15.0-1
local path = require 'pl.path'
print(path.normpath("/foo//")) -- Output is ok: /foo
print(path.normpath("//foo//bar")) -- Output fails (exessive forward slash): //foo/bar
print(path.normpath("//")) -- Output fails (exessive forward slash): //
print(path.normpath("///foo//bar")) -- Output is ok: /foo/bar
print(path.normpath("///")) -- Output is ok: /
print(path.normpath("////foo//bar")) -- Output is ok: /foo/bar
print(path.normpath("////")) -- Output is ok: /
P.S. I don't know how it works in Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions