mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Fix gitstatus pathspec errors
This commit is contained in:
parent
983d689a05
commit
82d1510213
|
@ -72,7 +72,7 @@ index fe5d650..059c7bf 100644
|
||||||
+ size_t i = -1;
|
+ size_t i = -1;
|
||||||
+ git_statuses.show = FALSE;
|
+ git_statuses.show = FALSE;
|
||||||
+ workdir[xstrlen(workdir) - 1] = '\0';
|
+ workdir[xstrlen(workdir) - 1] = '\0';
|
||||||
+ snprintf(pathspec, PATH_MAX, "%s%s%s 2>/dev/null", gitstat, path, cfg.showhidden ? "" : "/*");
|
+ snprintf(pathspec, PATH_MAX, "%s\"%s\"%s 2>/dev/null", gitstat, path, cfg.showhidden ? "" : "/*");
|
||||||
+ fp = popen(pathspec, "r");
|
+ fp = popen(pathspec, "r");
|
||||||
+
|
+
|
||||||
+ while (fgets(status, PATH_MAX, fp)) {
|
+ while (fgets(status, PATH_MAX, fp)) {
|
||||||
|
|
|
@ -73,7 +73,7 @@ index 2d33716..b190177 100644
|
||||||
+ size_t i = -1;
|
+ size_t i = -1;
|
||||||
+ git_statuses.show = FALSE;
|
+ git_statuses.show = FALSE;
|
||||||
+ workdir[xstrlen(workdir) - 1] = '\0';
|
+ workdir[xstrlen(workdir) - 1] = '\0';
|
||||||
+ snprintf(pathspec, PATH_MAX, "%s%s%s 2>/dev/null", gitstat, path, cfg.showhidden ? "" : "/*");
|
+ snprintf(pathspec, PATH_MAX, "%s\"%s\"%s 2>/dev/null", gitstat, path, cfg.showhidden ? "" : "/*");
|
||||||
+ fp = popen(pathspec, "r");
|
+ fp = popen(pathspec, "r");
|
||||||
+
|
+
|
||||||
+ while (fgets(status, PATH_MAX, fp)) {
|
+ while (fgets(status, PATH_MAX, fp)) {
|
||||||
|
|
Loading…
Reference in a new issue