diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 0d2df3c85..27a7ee700 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,5 +1,7 @@ 2002-11-06 Andrew V. Samoilov + * smbfs.c (new_dir_entry): Initialize st_ino, so recursive + directory copying is possible now. * vfs.c (mc_get_current_wd): Make sure returned string is null terminated. @@ -1763,9 +1765,9 @@ Patch by Andrew V. Samoilov - * vfs.c (vfs_parse_ls_lga): don't hard code st_ino and st_dev to 0's, - these variables must be assigned in vfs_s_new_inode () or extfs - layer, so ftpfs subdirectories now can be copied. + * vfs.c (vfs_parse_ls_lga): Don't hard code st_ino and st_dev to + 0's, these variables must be assigned in vfs_s_new_inode() or + extfs layer, so ftpfs subdirectories now can be copied. 2000-02-25 Pavel Machek diff --git a/vfs/smbfs.c b/vfs/smbfs.c index 75a4ddd02..8eb47bb50 100644 --- a/vfs/smbfs.c +++ b/vfs/smbfs.c @@ -418,22 +418,24 @@ static opendir_info static gboolean first_direntry; -static dir_entry * -new_dir_entry (const char * name) +static dir_entry * +new_dir_entry (const char *name) { - dir_entry *new_entry; - new_entry = g_new0 (dir_entry, 1); - new_entry->text = dos_to_unix (g_strdup (name), 1); + static int inode_counter; + dir_entry *new_entry; + new_entry = g_new0 (dir_entry, 1); + new_entry->text = dos_to_unix (g_strdup (name), 1); - if (first_direntry) { - current_info->entries = new_entry; - first_direntry = FALSE; - } else { - current_info->current->next = new_entry; - } - current_info->current = new_entry; + if (first_direntry) { + current_info->entries = new_entry; + first_direntry = FALSE; + } else { + current_info->current->next = new_entry; + } + current_info->current = new_entry; + new_entry->my_stat.st_ino = inode_counter++; - return new_entry; + return new_entry; } /* browse for shares on server */