Skip to content

Commit

Permalink
Fix issue with file details
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Apr 1, 2019
1 parent 1238130 commit 4cce877
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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) {
Expand Down

0 comments on commit 4cce877

Please sign in to comment.