Since cwd is a path, use PATH_MAX and not NAME_MAX

This commit is contained in:
Mahmoud Al-Qudsi
2017-09-26 10:00:23 -05:00
parent b495c68f28
commit c40188e40e

View File

@@ -137,7 +137,7 @@ bool wreaddir_for_dirs(DIR *dir, wcstring *out_name) {
}
const wcstring wgetcwd() {
char cwd[NAME_MAX];
char cwd[PATH_MAX];
char *res = getcwd(cwd, sizeof(cwd));
if (res) {
return str2wcstring(res);