瀏覽代碼

Retain a way to return to start dir if file opened

master
Arun Prakash Jana 3 年之前
父節點
當前提交
16de133fea
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      src/nnn.c

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

@@ -5904,6 +5904,11 @@ static bool browse(char *ipath, const char *session, int pkey)
lastname = g_ctx[0].c_name; /* last visited filename */

xstrsncpy(g_ctx[0].c_path, ipath, PATH_MAX);
/* If the initial path is a file, retain a way to return to start dir */
if (g_state.initfile) {
free(initpath);
initpath = ipath = getcwd(NULL, 0);
}
path = g_ctx[0].c_path; /* current directory */

g_ctx[0].c_fltr[0] = g_ctx[0].c_fltr[1] = '\0';


Loading…
取消
儲存