lairworks / nas2d-core

NAS2D is an open source, object oriented 2D game development framework written in portable C++.
http://nas2d.lairworks.com
zlib License
10 stars 5 forks source link

Redefine and re-implement `Filesystem::extension` #1079

Closed DanRStevens closed 1 year ago

DanRStevens commented 1 year ago

Unit tests have a slight change to match up with std::filesystem::path::extension. In particular, there must be a stem before any . before anything is considered an extension.

Note: On Linux, a leading . is used to represent a normally hidden file or folder, much like the Hidden attribute on Windows. For example, the Linux makefile places intermediate files in a .build/ folder. In this case, the whole filename is considered the stem, and there is no extension. The leading . here is used to denote a hidden file, not the start of an extension with no stem for the filename.

Noticed this while working on PR #1077.