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

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

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

Visibility: public

Requested revision: a42c7129347e6e5668b1001ff6f2fc97a89b0510

Requested commit: a42c7129347e6e5668b1001ff6f2fc97a89b0510

Commit: a42c7129347e6e5668b1001ff6f2fc97a89b0510

Tree: 224bb1b12fff4c7e077ee214d8c99d41b9f2d5c9

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

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

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