# std.fs.path.extension: different behavior for ending dot · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/d569e37cb538d17d009f5632c25acd643d3736cb)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: d569e37cb538d17d009f5632c25acd643d3736cb

Requested commit: d569e37cb538d17d009f5632c25acd643d3736cb

Commit: d569e37cb538d17d009f5632c25acd643d3736cb

Tree: c37b0c62d324752480a7f26a5312154431fd43d3

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.fs.path.extension: different behavior for ending dot

extension("a.") now returns "." instead of "".

This matches both Python and Node.js standard library behavior as well
as my personal opinion on how this function should be defined.

Apologies for missing this in the code review.

```

## Parents

- [6ab5bebed1d0808ad8153097332519088d5af95a](https://git.cafe/gitcafe/zig/commit/6ab5bebed1d0808ad8153097332519088d5af95a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/d569e37cb538d17d009f5632c25acd643d3736cb?format=markdown)
