diff options
author | Linus Heckemann <git@sphalerite.org> | 2018-08-13 11:27:35 +0200 |
---|---|---|
committer | Linus Heckemann <git@sphalerite.org> | 2018-08-13 11:27:35 +0200 |
commit | d7402c9cd5c17644d73b2a7a39e10be22fffeb00 (patch) | |
tree | b8dbb47c0a4396d3f8655f75a3efaa93a5aa98a0 /src/libutil | |
parent | f72c907ad833fa26800ad1694e63f3cec952b444 (diff) |
dirOf: allow use on non-absolute paths
Diffstat (limited to 'src/libutil')
-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 6bc64ae75..4cc7455be 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); } |