* smbfs.c (new_dir_entry): Initialize st_ino, so recursive directory

copying is possible now.
This commit is contained in:
Andrew V. Samoilov 2002-11-07 14:49:13 +00:00
parent d6ca256d6c
commit 6b0df00830
2 changed files with 20 additions and 16 deletions

View File

@ -1,5 +1,7 @@
2002-11-06 Andrew V. Samoilov <sav@bcs.zp.ua> 2002-11-06 Andrew V. Samoilov <sav@bcs.zp.ua>
* 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 * vfs.c (mc_get_current_wd): Make sure returned string is null
terminated. terminated.
@ -1763,9 +1765,9 @@
Patch by Andrew V. Samoilov <sav@bcs.zp.ua> Patch by Andrew V. Samoilov <sav@bcs.zp.ua>
* vfs.c (vfs_parse_ls_lga): don't hard code st_ino and st_dev to 0's, * vfs.c (vfs_parse_ls_lga): Don't hard code st_ino and st_dev to
these variables must be assigned in vfs_s_new_inode () or extfs 0's, these variables must be assigned in vfs_s_new_inode() or
layer, so ftpfs subdirectories now can be copied. extfs layer, so ftpfs subdirectories now can be copied.
2000-02-25 Pavel Machek <pavel@artax.karlin.mff.cuni.cz> 2000-02-25 Pavel Machek <pavel@artax.karlin.mff.cuni.cz>

View File

@ -418,22 +418,24 @@ static opendir_info
static gboolean first_direntry; static gboolean first_direntry;
static dir_entry * static dir_entry *
new_dir_entry (const char * name) new_dir_entry (const char *name)
{ {
dir_entry *new_entry; static int inode_counter;
new_entry = g_new0 (dir_entry, 1); dir_entry *new_entry;
new_entry->text = dos_to_unix (g_strdup (name), 1); new_entry = g_new0 (dir_entry, 1);
new_entry->text = dos_to_unix (g_strdup (name), 1);
if (first_direntry) { if (first_direntry) {
current_info->entries = new_entry; current_info->entries = new_entry;
first_direntry = FALSE; first_direntry = FALSE;
} else { } else {
current_info->current->next = new_entry; current_info->current->next = new_entry;
} }
current_info->current = 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 */ /* browse for shares on server */