Chameleon Applications

Chameleon Applications Commit Details

Date:2011-12-04 23:22:14 (7 years 7 months ago)
Author:Rekursor
Commit:447
Parents: 446
Message:Fixed smbios.plist would not open but boo plist file instead.
Changes:
M/trunk/ChameleonPrefPane/Sources/SmbiosController.mm
M/trunk/ChameleonPrefPane/Sources/string_util.h

File differences

trunk/ChameleonPrefPane/Sources/string_util.h
8989
9090
9191
92
93
94
95
96
97
98
99
100
101
102
92103
104
93105
94106
95107
return pos!=std::string::npos ? str.erase(source.find_first_of(substr) ) : str;
}
/**
* return the left portion of the string until substr sep is found
*/
inline std::string string_dir_from(const std::string& source)
{
std::string str = source;
std::string::size_type pos = str.find_last_of('/');
if (pos!= std::string::npos)
str.erase(pos+1);
return str;
}
inline char HexToDec(char nibble) { nibble = toupper(nibble); return (nibble < 'A') ? nibble - '0' : nibble - 'A' +10;}
#endif
trunk/ChameleonPrefPane/Sources/SmbiosController.mm
4848
4949
5050
51
51
52
53
54
55
56
5257
5358
5459
static std::string path;
path = BootProp::instance().propFilePath();
if (fileExists(path.c_str()))
return path.c_str();
{
path = string_dir_from(path) + "smbios.plist";
if (fileExists(path.c_str()))
return path.c_str();
}
if (fileExists("/Extra/smbios.plist"))
return "/Extra/smbios.plist";
else if (fileExists("/smbios.plist"))

Archive Download the corresponding diff file

Revision: 447