1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

CanonPath: Add rel_c_str()

Defensively because isRoot() is also defensive.
This commit is contained in:
Robert Hensing 2024-01-12 22:55:37 +01:00
parent 274d887fee
commit 15f7bdaf27
2 changed files with 8 additions and 2 deletions

View file

@ -674,8 +674,7 @@ struct GitExportIgnoreInputAccessor : CachingFilteringInputAccessor {
bool gitAttrGet(const CanonPath & path, const char * attrName, const char * & valueOut)
{
std::string pathStr {path.rel()};
const char * pathCStr = pathStr.c_str();
const char * pathCStr = path.rel_c_str();
if (rev) {
git_attr_options opts = GIT_ATTR_OPTIONS_INIT;