From 82d15102132754e00f73dc074d7ec184c1ea81e0 Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Tue, 17 Aug 2021 14:01:24 +0200 Subject: [PATCH] Fix gitstatus pathspec errors --- patches/gitstatus/mainline.diff | 2 +- patches/gitstatus/namefirst.diff | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/gitstatus/mainline.diff b/patches/gitstatus/mainline.diff index f8d4b784..64d39f9f 100644 --- a/patches/gitstatus/mainline.diff +++ b/patches/gitstatus/mainline.diff @@ -72,7 +72,7 @@ index fe5d650..059c7bf 100644 + size_t i = -1; + git_statuses.show = FALSE; + 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"); + + while (fgets(status, PATH_MAX, fp)) { diff --git a/patches/gitstatus/namefirst.diff b/patches/gitstatus/namefirst.diff index f6f1660a..fe962d94 100644 --- a/patches/gitstatus/namefirst.diff +++ b/patches/gitstatus/namefirst.diff @@ -73,7 +73,7 @@ index 2d33716..b190177 100644 + size_t i = -1; + git_statuses.show = FALSE; + 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"); + + while (fgets(status, PATH_MAX, fp)) {