[ostree] core: Correctly map S_ISDIR to G_FILE_TYPE_DIRECTORY
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: Correctly map S_ISDIR to G_FILE_TYPE_DIRECTORY
- Date: Sun, 4 Dec 2011 19:10:36 +0000 (UTC)
commit 56e0f231b559b7d06c033fe5c75b03bd99ce7783
Author: Colin Walters <walters verbum org>
Date: Sun Dec 4 13:10:37 2011 -0500
core: Correctly map S_ISDIR to G_FILE_TYPE_DIRECTORY
src/libotutil/ot-gio-utils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libotutil/ot-gio-utils.c b/src/libotutil/ot-gio-utils.c
index 1700fcd..1d94732 100644
--- a/src/libotutil/ot-gio-utils.c
+++ b/src/libotutil/ot-gio-utils.c
@@ -37,7 +37,9 @@
GFileType
ot_gfile_type_for_mode (guint32 mode)
{
- if (S_ISREG (mode))
+ if (S_ISDIR (mode))
+ return G_FILE_TYPE_DIRECTORY;
+ else if (S_ISREG (mode))
return G_FILE_TYPE_REGULAR;
else if (S_ISLNK (mode))
return G_FILE_TYPE_SYMBOLIC_LINK;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]