Ticket #2834: Fixed bug 'FTBFS with --disable-vfs'

Steps to reproduce:
 * ./configure --disable-vfs
 * make

Expected result: project should be builded successfully.

Actual result:
build stopped with errors:
lib/vfs/interface.c: In function 'mc_chdir':
lib/vfs/interface.c:714: error: 'struct vfs_s_super' has no member named 'path_element'
lib/vfs/interface.c:716: error: 'struct vfs_s_super' has no member named 'path_element'
lib/vfs/interface.c:717: error: 'struct vfs_s_super' has no member named 'path_element'

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2012-06-25 11:18:00 +03:00
parent a7b558f4f1
commit c277ac5b6f

View File

@ -711,8 +711,6 @@ mc_chdir (const vfs_path_t * vpath)
path_element = vfs_path_get_by_index (vfs_get_raw_current_dir (), -1);
if (vfs_path_element_valid (path_element))
{
struct vfs_s_super *super;
if (*path_element->path != '\0')
{
char *p;
@ -722,12 +720,18 @@ mc_chdir (const vfs_path_t * vpath)
*p = '\0';
}
super = vfs_get_super_by_vpath (vpath);
if (super != NULL && super->path_element != NULL)
#ifdef ENABLE_VFS_NET
{
g_free (super->path_element->path);
super->path_element->path = g_strdup (path_element->path);
struct vfs_s_super *super;
super = vfs_get_super_by_vpath (vpath);
if (super != NULL && super->path_element != NULL)
{
g_free (super->path_element->path);
super->path_element->path = g_strdup (path_element->path);
}
}
#endif /* ENABLE_VFS_NET */
}
return 0;