diff options
| author | 2019-04-01 20:14:49 +0530 | |
|---|---|---|
| committer | 2019-04-01 20:14:49 +0530 | |
| commit | 4cce8774492ee69fe9e3ba466828285e187a9b5e (patch) | |
| tree | 63630573570b3fe25abff2592a376305a8a41edd /src | |
| parent | 1238130e78bd9356ff5ea4e57798c1bcc1fec913 (diff) | |
| download | nnn-4cce8774492ee69fe9e3ba466828285e187a9b5e.tar.gz | |
Fix issue with file details
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -2286,6 +2286,7 @@ static bool show_stats(const char *fpath, const char *fname, const struct stat * { int fd; char *p, *begin = g_buf; + size_t r; FILE *fp; if (g_tmpfpath[0]) @@ -2298,8 +2299,11 @@ static bool show_stats(const char *fpath, const char *fname, const struct stat * if (fd == -1) return FALSE; - xstrlcpy(g_buf, "stat ", 6); - xstrlcpy(g_buf + 5, fpath, 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 - 1] = '\0'; + DPRINTF_S(g_buf); fp = popen(g_buf, "r"); if (fp != NULL) { |