Skip to content

fileInfoFromStat improperly truncates names with a trailing slash #1645

@gopherbot

Description

@gopherbot

by dforsythe:

What steps will reproduce the problem?
1. Call os.Stat() or os.Lstat() with a name that has a trailing /
2. Check or print the Name field in the FileInfo struct the call produces

What is the expected output?
The Name field of the FileInfo struct should be the basename of the passed name

What do you see instead?
A blank string

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g, 8g

Which operating system are you using?
FreeBSD 9.0-CURRENT, OS X 10.6.7

Which revision are you using?  (hg identify)
085423df5c7f tip

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