VirtualBox

Changeset 44563 in vbox


Ignore:
Timestamp:
Feb 6, 2013 1:15:10 PM (12 years ago)
Author:
vboxsync
Message:

Main: prefer <HOME>/.config/VirtualBox over <HOME>/.VirtualBox for new users on platforms where XDG is relevant, clean-up, and change preferences to always use .VirtualBox if it exists.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/com.cpp

    r44552 r44563  
    5555#include <VBox/version.h>
    5656
    57 const char *apcszUserHome[] =
     57#if !defined(RT_OS_DARWIN) && !defined(RT_OS_WINDOWS)
     58char szXdgConfigHome[RTPATH_MAX] = "";
     59#endif
     60
     61/**
     62 * Possible locations for the VirtualBox user configuration folder,
     63 * listed from oldest (as in legacy) to newest.  These can be either
     64 * absolute or relative to the home directory.  We use the first entry
     65 * of the list which corresponds to a real folder on storage, or
     66 * create a folder corresponding to the last in the list (the least
     67 * legacy) if none do.
     68 */
     69const char *const apcszUserHome[] =
    5870#ifdef RT_OS_DARWIN
    5971{ "Library/VirtualBox" };
     
    6173{ ".VirtualBox" };
    6274#else
    63 { ".config/VirtualBox", ".VirtualBox" };
    64 char szXdgConfigHome[RTPATH_MAX];
     75{ ".VirtualBox", szXdgConfigHome };
    6576#endif
    6677
     
    235246                                       sizeof(szXdgConfigHome),
    236247                                       "VirtualBox");
    237                     apcszUserHome[0] = szXdgConfigHome;
    238248            }
     249            else
     250                vrc = RTStrCopy(szXdgConfigHome,
     251                                sizeof(szXdgConfigHome),
     252                                ".config/VirtualBox");
    239253#endif
    240254            for (unsigned i = 0; i < RT_ELEMENTS(apcszUserHome); ++i)
     
    247261                }
    248262            }
    249             if (!fFound)
    250                 vrc = composeHomePath(aDir, aDirLen, apcszUserHome[0]);
    251263        }
    252264
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