diff options
| author | 2018-11-11 04:43:27 +0530 | |
|---|---|---|
| committer | 2018-11-11 05:00:37 +0530 | |
| commit | 0169232d9c3ac4959688e75ec6986c6d1f917b3c (patch) | |
| tree | 3a5e01c5d422e623273db2350e2c8dc7ae904990 /src | |
| parent | 598bf6368654d04902d54a6a0d964243e1a22536 (diff) | |
| download | nnn-0169232d9c3ac4959688e75ec6986c6d1f917b3c.tar.gz | |
When copying a single file sync cp file and cp buf
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2975,6 +2975,10 @@ nochange: } else if (cfg.quote) { g_buf[0] = '\''; r = mkpath(path, dents[cur].name, g_buf + 1, PATH_MAX); + /* Keep the copy buf in sync */ + copybufpos = 0; + appendfpath(g_buf + 1, r); + g_buf[r] = '\''; g_buf[r + 1] = '\0'; @@ -2987,6 +2991,10 @@ nochange: printmsg(g_buf + 1); } else { r = mkpath(path, dents[cur].name, newpath, PATH_MAX); + /* Keep the copy buf in sync */ + copybufpos = 0; + appendfpath(newpath, r); + if (!copier) writecp(newpath, r - 1); /* Truncate NULL from end */ else |