瀏覽代碼

Support file path quote on single copy

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

+ 14
- 3
nnn.c 查看文件

@@ -2839,13 +2839,24 @@ nochange:
goto begin;
case SEL_COPY:
if (copier && ndents) {
r = mkpath(path, dents[cur].name, newpath, PATH_MAX);
if (cfg.copymode) {
r = mkpath(path, dents[cur].name, newpath, PATH_MAX);
if (!appendfilepath(newpath, r))
goto nochange;
} else
printmsg(newpath);
} else if (cfg.quote) {
g_buf[0] = '\'';
r = mkpath(path, dents[cur].name, g_buf + 1, PATH_MAX);
g_buf[r] = '\'';
g_buf[r + 1] = '\0';

spawn(copier, g_buf, NULL, NULL, F_NONE);
printmsg(g_buf);
} else {
mkpath(path, dents[cur].name, newpath, PATH_MAX);
spawn(copier, newpath, NULL, NULL, F_NONE);
printmsg(newpath);
printmsg(newpath);
}
} else if (!copier)
printmsg(messages[STR_COPY_ID]);
goto nochange;


Loading…
取消
儲存