trash dir is ~/.local/trash

This commit is contained in:
Arun Prakash Jana 2019-03-02 18:45:15 +05:30
parent 62d1ff278f
commit ff2bfff386
No known key found for this signature in database
GPG Key ID: A75979F35C080412
3 changed files with 3 additions and 9 deletions

View File

@ -393,7 +393,7 @@ The following indicators are used in the detail view:
| `NNN_NO_AUTOSELECT=1` | do not auto-select matching dir in _nav-as-you-type` mode |
| `NNN_RESTRICT_NAV_OPEN=1` | open files on <kbd></kbd>, not <kbd></kbd> or <kbd>l</kbd> |
| `NNN_RESTRICT_0B=1` | do not open 0-byte files |
| `NNN_TRASH=1` | move files to `~/.local/share/nnn/trash` on delete |
| `NNN_TRASH=1` | move files to `~/.local/trash` on delete |
| `NNN_CP_MV_PROG=1` | show copy, move progress on Linux |
#### Help

2
nnn.1
View File

@ -348,7 +348,7 @@ files.
export NNN_RESTRICT_0B=1
.Ed
.Pp
\fBNNN_TRASH:\fR move files to \fB~/.local/share/nnn/trash\fR on delete.
\fBNNN_TRASH:\fR move files to \fB~/.local/trash\fR on delete.
.Bd -literal
export NNN_TRASH=1
.Ed

View File

@ -4125,13 +4125,7 @@ int main(int argc, char *argv[])
/* Create trash dir if missing */
g_tmpfplen = xstrlcpy(g_trash, home, PATH_MAX);
g_tmpfplen += xstrlcpy(g_trash + g_tmpfplen - 1,
"/.local/share/nnn", PATH_MAX - g_tmpfplen);
DPRINTF_S(g_trash);
if (!createdir(g_trash, 0777))
return 1;
xstrlcpy(g_trash + g_tmpfplen - 2, "/trash", PATH_MAX - g_tmpfplen);
xstrlcpy(g_trash + g_tmpfplen - 1, "/.local/trash", PATH_MAX - g_tmpfplen);
DPRINTF_S(g_trash);
if (!createdir(g_trash, 0777))
return 1;