aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-18 13:35:57 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-04-18 13:35:57 +0530
commitb40e12ee9f249a9374dd28dbe2d265371082fa46 (patch)
tree5dd495f72f2b47dbe8dd5bb9779c3e1f9ddcb6df /src
parent75724f9e3b6463d44081a5c48b68a0b28a69ef4a (diff)
downloadnnn-b40e12ee9f249a9374dd28dbe2d265371082fa46.tar.gz
Remove hacky single path handling
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 1ecfc38..a49aed9 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -6352,7 +6352,7 @@ static char *load_input()
/* 512 KiB chunk size */
ssize_t i, chunk_count = 1, chunk = 512 * 1024, entries = 0;
char *input = malloc(sizeof(char) * chunk), *tmpdir = NULL;
- char cwd[PATH_MAX], *next, *tmp;
+ char cwd[PATH_MAX], *next;
size_t offsets[LIST_FILES_MAX];
char **paths = NULL;
ssize_t input_read, total_read = 0, off = 0;
@@ -6474,17 +6474,8 @@ static char *load_input()
DPRINTF_S(prefixpath);
- if (prefixpath[0]) {
- if (entries == 1) {
- tmp = xmemrchr((uchar *)prefixpath, '/', xstrlen(prefixpath));
- if (!tmp)
- goto malloc_2;
-
- *(tmp != prefixpath ? tmp : tmp + 1) = '\0';
- }
-
+ if (prefixpath[0])
tmpdir = make_tmp_tree(paths, entries, prefixpath);
- }
malloc_2:
for (i = entries - 1; i >= 0; --i)