VirtualBox

Changeset 43173 in vbox


Ignore:
Timestamp:
Sep 4, 2012 5:31:56 PM (12 years ago)
Author:
vboxsync
Message:

Linux GA: Shared Folders: fix default NLS table loading issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.c

    r43050 r43173  
    107107    memcpy(str_name->String.utf8, info->name, name_len + 1);
    108108
    109     if (info->nls_name[0] && strcmp(info->nls_name, "utf8"))
     109/* Check if NLS charset is valid and not points to UTF8 table */
     110#define VFSMOD_HAS_NLS(_name) \
     111    (_name[0] && strcmp(_name, "utf8"))
     112    if (VFSMOD_HAS_NLS(info->nls_name))
    110113    {
    111114        sf_g->nls = load_nls(info->nls_name);
     
    118121    }
    119122    else
     123    {
    120124        /* If no NLS charset specified, try to load the default one */
    121         sf_g->nls = load_nls_default();
     125        if (VFSMOD_HAS_NLS(CONFIG_NLS_DEFAULT))
     126            sf_g->nls = load_nls_default();
     127        else
     128            sf_g->nls = NULL;
     129    }
     130#undef VFSMOD_HAS_NLS
    122131
    123132    rc = vboxCallMapFolder(&client_handle, str_name, &sf_g->map);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette