mirror of
https://github.com/ksherlock/mpw-shell.git
synced 2024-06-01 08:41:32 +00:00
PATH_MAX + 1
This commit is contained in:
parent
34a4f431c0
commit
2893f7fe79
|
@ -269,10 +269,10 @@ namespace filesystem {
|
||||||
path current_path(error_code& ec) {
|
path current_path(error_code& ec) {
|
||||||
|
|
||||||
char *cp;
|
char *cp;
|
||||||
char buffer[PATH_MAX];
|
char buffer[PATH_MAX+1];
|
||||||
|
|
||||||
ec.clear();
|
ec.clear();
|
||||||
cp = ::getcwd(buffer, sizeof(buffer));
|
cp = ::getcwd(buffer, PATH_MAX);
|
||||||
if (cp) return path(cp);
|
if (cp) return path(cp);
|
||||||
|
|
||||||
ec = error_code(errno, std::system_category());
|
ec = error_code(errno, std::system_category());
|
||||||
|
@ -304,7 +304,7 @@ namespace filesystem {
|
||||||
|
|
||||||
path canonical(const path& p, error_code& ec) {
|
path canonical(const path& p, error_code& ec) {
|
||||||
char *cp;
|
char *cp;
|
||||||
char buffer[PATH_MAX];
|
char buffer[PATH_MAX+1];
|
||||||
|
|
||||||
ec.clear();
|
ec.clear();
|
||||||
cp = realpath(p.c_str(), buffer);
|
cp = realpath(p.c_str(), buffer);
|
||||||
|
@ -316,7 +316,7 @@ namespace filesystem {
|
||||||
path canonical(const path& p, const path& base, error_code& ec) {
|
path canonical(const path& p, const path& base, error_code& ec) {
|
||||||
|
|
||||||
char *cp;
|
char *cp;
|
||||||
char buffer[PATH_MAX];
|
char buffer[PATH_MAX+1];
|
||||||
|
|
||||||
ec.clear();
|
ec.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user