Show stat when file has single quote

This commit is contained in:
Arun Prakash Jana 2019-07-05 01:27:46 +05:30
parent d5408c4e9f
commit 379fdf50fa
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -2440,9 +2440,9 @@ static bool show_stats(const char *fpath, const char *fname, const struct stat *
if (fd == -1)
return FALSE;
r = xstrlcpy(g_buf, "stat \'", PATH_MAX);
r = xstrlcpy(g_buf, "stat \"", PATH_MAX);
r += xstrlcpy(g_buf + r - 1, fpath, PATH_MAX);
g_buf[r - 2] = '\'';
g_buf[r - 2] = '\"';
g_buf[r - 1] = '\0';
DPRINTF_S(g_buf);