VirtualBox

Ignore:
Timestamp:
Jul 18, 2018 2:19:21 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123809
Message:

bugref:9152. Correctly processing the nonexisting configuration file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/CloudUserProfileManagerImpl.cpp

    r73177 r73204  
    138138                                     .append("config");
    139139                        LogRel(("config = %s\n", strConfigPath.c_str()));
    140                         hrc = ptrOCIUserProfileList->readProfiles(strConfigPath);
    141                         if (SUCCEEDED(hrc))
     140                        if (RTFileExists(strConfigPath.c_str()))
    142141                        {
    143                             LogRel(("Reading profiles from %s has been done\n", strConfigPath.c_str()));
     142                            hrc = ptrOCIUserProfileList->readProfiles(strConfigPath);
     143                            if (SUCCEEDED(hrc))
     144                            {
     145                                LogRel(("Reading profiles from %s has been done\n", strConfigPath.c_str()));
     146                            }
     147                            else
     148                            {
     149                                LogRel(("Reading profiles from %s hasn't been done\n", strConfigPath.c_str()));
     150                            }
     151
     152                            ptrCloudUserProfileList = ptrOCIUserProfileList;
     153                            hrc = ptrCloudUserProfileList.queryInterfaceTo(aProfiles.asOutParam());
    144154                        }
    145155                        else
    146156                        {
    147                             LogRel(("Reading profiles from %s hasn't been done\n", strConfigPath.c_str()));
     157                            hrc = setError(VERR_FILE_NOT_FOUND, tr("Could not locate the config file '%s'"),
     158                                           strConfigPath.c_str());
    148159                        }
    149                         ptrCloudUserProfileList = ptrOCIUserProfileList;
    150                         hrc = ptrCloudUserProfileList.queryInterfaceTo(aProfiles.asOutParam());
    151160                    }
    152161                    else
Note: See TracChangeset for help on using the changeset viewer.

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