Skip to content

Filename.dirname is not handling multiple / on Unix #4549

Description

@vicuna

Original bug ID: 4549
Reporter: till
Status: closed (set by @xavierleroy on 2013-08-31T10:44:09Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.1
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #5429
Monitored by: @rixed @ygrek @hcarty

Bug description

Under unix / and // in a path are semantically the same. The case where double / are present in a path is rare but leads to dirname returning eronous results:

Filename.dirname (Filename.dirname "a/b//c") -> "a/b" instead of "a"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions