[libgit2-glib] Set filemode to tree when statting directories for index entries
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Set filemode to tree when statting directories for index entries
- Date: Sun, 14 Dec 2014 09:56:06 +0000 (UTC)
commit 24805e9c2ba55c1cfd493245ac2652f840da214c
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sun Dec 14 10:55:20 2014 +0100
Set filemode to tree when statting directories for index entries
libgit2-glib/ggit-index-entry.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-index-entry.c b/libgit2-glib/ggit-index-entry.c
index d56dc41..81d43e9 100644
--- a/libgit2-glib/ggit-index-entry.c
+++ b/libgit2-glib/ggit-index-entry.c
@@ -676,6 +676,10 @@ file_info_to_filemode (GFileInfo *info)
{
ret |= GIT_FILEMODE_LINK;
}
+ else if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
+ {
+ ret |= GIT_FILEMODE_TREE;
+ }
else if (g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE))
{
ret |= GIT_FILEMODE_BLOB_EXECUTABLE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]