瀏覽代碼

Ensure co file does not have stale paths

master
Arun Prakash Jana 5 年之前
父節點
當前提交
721ac62f72
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 14 行新增0 行删除
  1. +14
    -0
      src/nnn.c

+ 14
- 0
src/nnn.c 查看文件

@@ -2967,6 +2967,20 @@ nochange:
goto nochange;

if (cfg.copymode) {
/*
* Clear the tmp copy path file on first copy.
*
* This ensures that when the first file path is
* copied into memory (but not written to tmp file
* yet to save on writes), the tmp file is cleared.
* The user may be in the middle of a multicopy op
* and issue a cp, mv of multi-rm assuming the files
* in the copy list would be affected. However, these
* ops read the source file paths from the tmp file.
*/
if (!ncp)
writecp(NULL, 0);

r = mkpath(path, dents[cur].name, newpath, PATH_MAX);
if (!appendfpath(newpath, r))
goto nochange;


Loading…
取消
儲存