mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 20:37:20 +02:00
Bug #1196
- Applied patch to fix the need for PATH_MAX on GNU/Hurd (thanks to Jakub Wilk).
This commit is contained in:
parent
3e4972ba4b
commit
89d536c901
1 changed files with 3 additions and 6 deletions
|
@ -35,6 +35,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <Directory.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -248,17 +249,13 @@ std::string Path::expand (const std::string& in)
|
||||||
else if (in.length () > 2 &&
|
else if (in.length () > 2 &&
|
||||||
in.substr (0, 2) == "./")
|
in.substr (0, 2) == "./")
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
copy = Directory::cwd () + "/" + in.substr (2);
|
||||||
getcwd (buf, PATH_MAX - 1);
|
|
||||||
copy = std::string (buf) + "/" + in.substr (2);
|
|
||||||
}
|
}
|
||||||
else if (in.length () > 1 &&
|
else if (in.length () > 1 &&
|
||||||
in[0] != '.' &&
|
in[0] != '.' &&
|
||||||
in[0] != '/')
|
in[0] != '/')
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
copy = Directory::cwd () + "/" + in;
|
||||||
getcwd (buf, PATH_MAX - 1);
|
|
||||||
copy = std::string (buf) + "/" + in;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue