From de4b279089d40131346cbd28e4f27b6e9716fab9 Mon Sep 17 00:00:00 2001
From: Paul Sladen
Date: Sat, 30 Aug 2008 09:03:16 -0700
Subject: Fixed permissions on directories.

Signed-off-by: Matt Colyer <matt@colyer.name>
---
 AUTHORS     | 1 +
 src/ifuse.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/AUTHORS b/AUTHORS
index f44ab27..0d4f745 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,3 +4,4 @@ Matt Colyer
 Martin Aumueller
 Christophe Fergeau
 Martin S.
+Paul Sladen
diff --git a/src/ifuse.c b/src/ifuse.c
index e07c939..7672bb9 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -57,7 +57,7 @@ static int ifuse_getattr(const char *path, struct stat *stbuf) {
 	if (!file){
 		res = -ENOENT;
 	} else {
-		stbuf->st_mode = file->type | 0644; // but we don't want anything on the iPhone executable, like, ever
+	  	stbuf->st_mode = file->type | (S_ISDIR(file->type) ? 0755 : 0644);
 		stbuf->st_size = file->size;
 		stbuf->st_blksize = 2048; // FIXME: Is this the actual block size used on the iPhone?
 		stbuf->st_blocks = file->blocks;
-- 
cgit v1.1-32-gdbae