From bec849ae14ae5db6a793d23b4a1b3095d484fcc2 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 20 Mar 2018 05:56:20 +1100 Subject: [PATCH] Tolerate empty filenames in real_path --- src/file.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/file.cc b/src/file.cc index 54efe12f..f4db41b6 100644 --- a/src/file.cc +++ b/src/file.cc @@ -67,7 +67,9 @@ std::pair split_path(StringView path) String real_path(StringView filename) { - kak_assert(not filename.empty()); + if (filename.empty()) + return {}; + char buffer[PATH_MAX+1]; StringView existing = filename;