[libgit2-glib/wip/albfan/stage-windows] Invalid path resolving relative path on windows
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/albfan/stage-windows] Invalid path resolving relative path on windows
- Date: Mon, 17 May 2021 10:53:23 +0000 (UTC)
commit 2cc47f1e67588189c4184e23f79fc27ae125de48
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Mon May 17 12:43:15 2021 +0200
Invalid path resolving relative path on windows
libgit2-glib/ggit-index.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/libgit2-glib/ggit-index.c b/libgit2-glib/ggit-index.c
index 20cb8cd..c87f173 100644
--- a/libgit2-glib/ggit-index.c
+++ b/libgit2-glib/ggit-index.c
@@ -456,6 +456,10 @@ ggit_index_add_file (GgitIndex *idx,
wd = ggit_repository_get_workdir (repo);
path = g_file_get_relative_path (wd, file);
+ char **split = g_strsplit(path, "\\", -1);
+ g_free(path);
+ path = g_strjoinv("/", split);
+ g_strfreev(split);
g_object_unref (wd);
g_object_unref (repo);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]