diff --git a/nshlib/nsh_fsutils.c b/nshlib/nsh_fsutils.c index 30c2a19e9f..50f67d6d68 100644 --- a/nshlib/nsh_fsutils.c +++ b/nshlib/nsh_fsutils.c @@ -583,7 +583,7 @@ FAR char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl, snprintf(vtbl->iobuffer, IOBUFFERSIZE, "%s/%s", dirpath, path); } - return strdup(vtbl->iobuffer); + return lib_realpath(vtbl->iobuffer, NULL, true); } #endif