From cdc67ad0cf1e102568396b0649dd18ea1223d785 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 25 Sep 2015 15:25:50 +0200 Subject: Ignore empty cwd in process --- butl/process.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'butl/process.cxx') diff --git a/butl/process.cxx b/butl/process.cxx index 3556fd9..66a831e 100644 --- a/butl/process.cxx +++ b/butl/process.cxx @@ -76,7 +76,7 @@ namespace butl // Change current working directory if requested. // - if (cwd != nullptr && chdir (cwd) != 0) + if (cwd != nullptr && *cwd != '\0' && chdir (cwd) != 0) throw process_error (errno, true); if (execvp (args[0], const_cast (&args[0])) == -1) -- cgit v1.1