aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2006-11-11 10:11:55 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2006-11-11 10:11:55 +0000
commitd045a9be5e30b0ae251fb9f589bfa457c8d56c7d (patch)
tree370eebb5d9aa1c4a7b2e5e42d0d667ee45d84a3d
parent09d5ee2eeea3d4315b04e1f7793fd56f4ffd24a7 (diff)
downloadsshfs-d045a9be5e30b0ae251fb9f589bfa457c8d56c7d.tar
sshfs-d045a9be5e30b0ae251fb9f589bfa457c8d56c7d.tar.gz
sshfs-d045a9be5e30b0ae251fb9f589bfa457c8d56c7d.tar.bz2
sshfs-d045a9be5e30b0ae251fb9f589bfa457c8d56c7d.zip
fix
-rw-r--r--ChangeLog7
-rw-r--r--cache.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f793d2..b933cc5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
+2006-11-10 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix bug which ommitted directory entries for symlinks with the
+ -ofollow_symlinks option. Bug reported by Mikael Ståldal
+
2006-09-29 Miklos Szeredi <miklos@szeredi.hu>
* Fix segfault if there are outstanding writes to the server after
- release on the file descriptor. The only happened on FreeBSD.
+ release on the file descriptor. This only happened on FreeBSD.
Reported by Andriy Gapon
2006-08-18 Miklos Szeredi <miklos@szeredi.hu>
diff --git a/cache.c b/cache.c
index 3fbecfa..d17e735 100644
--- a/cache.c
+++ b/cache.c
@@ -250,12 +250,14 @@ static int cache_dirfill(fuse_cache_dirh_t ch, const char *name,
const struct stat *stbuf)
{
int err = ch->filler(ch->h, name, 0, 0);
- if (!err && (stbuf->st_mode & S_IFMT)) {
- char *fullpath;
+ if (!err) {
g_ptr_array_add(ch->dir, g_strdup(name));
- fullpath = g_strdup_printf("%s/%s", !ch->path[1] ? "" : ch->path, name);
- cache_add_attr(fullpath, stbuf);
- g_free(fullpath);
+ if (stbuf->st_mode & S_IFMT) {
+ char *fullpath =
+ g_strdup_printf("%s/%s", !ch->path[1] ? "" : ch->path, name);
+ cache_add_attr(fullpath, stbuf);
+ g_free(fullpath);
+ }
}
return err;
}