Procházet zdrojové kódy

Show target for symlinks

master
Arun Prakash Jana před 6 roky
rodič
revize
fd11b53b4e
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: A75979F35C080412
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +4
    -4
      nnn.c

+ 4
- 4
nnn.c Zobrazit soubor

@@ -1535,6 +1535,8 @@ show_stats(char *fpath, char *fname, struct stat *sb)
if (fd == -1) if (fd == -1)
return -1; return -1;


dprintf(fd, " File: '%s'", unescape(fname, 0));

/* Show file name or 'symlink' -> 'target' */ /* Show file name or 'symlink' -> 'target' */
if (perms[0] == 'l') { if (perms[0] == 'l') {
/* Note that MAX_CMD_LEN > PATH_MAX */ /* Note that MAX_CMD_LEN > PATH_MAX */
@@ -1542,16 +1544,14 @@ show_stats(char *fpath, char *fname, struct stat *sb)


if (len != -1) { if (len != -1) {
g_buf[len] = '\0'; g_buf[len] = '\0';
dprintf(fd, " File: '%s' -> ", unescape(fname, 0));


/* /*
* We pass g_buf but unescape() operates on g_buf too! * We pass g_buf but unescape() operates on g_buf too!
* Read the API notes for information on how this works. * Read the API notes for information on how this works.
*/ */
dprintf(fd, "'%s'", unescape(g_buf, 0));
dprintf(fd, " -> '%s'", unescape(g_buf, 0));
} }
} else
dprintf(fd, " File: '%s'", unescape(fname, 0));
}


/* Show size, blocks, file type */ /* Show size, blocks, file type */
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)


Načítá se…
Zrušit
Uložit