diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-09-13T12·33+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2018-09-13T12·33+0200 |
commit | 8327a7a8fa0ce6f6b1d1e0ea1324d053a031e438 (patch) | |
tree | 63790900172caf96ee222b7174cf550626f00c25 /src/libutil/util.cc | |
parent | 0aca1ffb6ef655a5147e27e4307074f0b303000f (diff) | |
parent | d7402c9cd5c17644d73b2a7a39e10be22fffeb00 (diff) |
Merge branch 'dirOf-relative' of https://github.com/lheckemann/nix
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r-- | src/libutil/util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 04c98dc80bf2..03f0be705c1d 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -167,7 +167,7 @@ Path dirOf(const Path & path) { Path::size_type pos = path.rfind('/'); if (pos == string::npos) - throw Error(format("invalid file name '%1%'") % path); + return "."; return pos == 0 ? "/" : Path(path, 0, pos); } |