From c2d4102f8291fb8af9e29eceb378e4ebda87dda0 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 20 Apr 2002 03:22:47 +0000 Subject: ftpfs/ 2002-04-13 Moritz Schulte * ftpfs.c: Include (main): Stat the underlying node and initialize the root node's stat information. * dir.c (ftpfs_refresh_node): If refreshing the root node, simply use the old stat information. libftpconn/ 2002-04-13 Moritz Schulte * unix.c: Include . (struct get_stats_state): New member: searched_name. (ftp_conn_unix_start_get_stats): Return EINVAL if trying to list the root node without listing it's content; set searched_name to the dirname. (ftp_conn_unix_cont_get_stats): If searching for the list info of one entry, skip all other entries. --- ftpfs/dir.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ftpfs/dir.c') diff --git a/ftpfs/dir.c b/ftpfs/dir.c index 9e550ce8..6ae5facc 100644 --- a/ftpfs/dir.c +++ b/ftpfs/dir.c @@ -483,8 +483,9 @@ ftpfs_refresh_node (struct node *node) if (!err && entry->noent) err = ENOENT; } - else + else if (*(entry->name)) { + /* The root node is treated seperately below. */ struct ftp_conn *conn; err = ftpfs_get_ftp_conn (dir->fs, &conn); @@ -518,6 +519,17 @@ ftpfs_refresh_node (struct node *node) entry->name_timestamp = timestamp; } } + else + { + /* Refresh the root node with the old stat + information. */ + struct refresh_entry_state res; + res.entry = entry; + res.timestamp = timestamp; + err = update_old_entry (entry->name, + &netfs_root_node->nn_stat, + NULL, &res); + } } if ((entry->stat.st_mtime < node->nn_stat.st_mtime -- cgit v1.2.3