From 89d536c9017f134b024f9e9e56068ddce4417b9e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 7 Jan 2014 23:34:06 -0500 Subject: [PATCH] Bug #1196 - Applied patch to fix the need for PATH_MAX on GNU/Hurd (thanks to Jakub Wilk). --- src/Path.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Path.cpp b/src/Path.cpp index 27622509d..94657e240 100644 --- a/src/Path.cpp +++ b/src/Path.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include //////////////////////////////////////////////////////////////////////////////// @@ -248,17 +249,13 @@ std::string Path::expand (const std::string& in) else if (in.length () > 2 && in.substr (0, 2) == "./") { - char buf[PATH_MAX]; - getcwd (buf, PATH_MAX - 1); - copy = std::string (buf) + "/" + in.substr (2); + copy = Directory::cwd () + "/" + in.substr (2); } else if (in.length () > 1 && in[0] != '.' && in[0] != '/') { - char buf[PATH_MAX]; - getcwd (buf, PATH_MAX - 1); - copy = std::string (buf) + "/" + in; + copy = Directory::cwd () + "/" + in; } return copy;