Index: trunk/ChameleonPrefPane/Sources/ShellProcess.cpp =================================================================== --- trunk/ChameleonPrefPane/Sources/ShellProcess.cpp (revision 120) +++ trunk/ChameleonPrefPane/Sources/ShellProcess.cpp (revision 121) @@ -151,13 +151,16 @@ part = line[skipwhite]-'0'; partInfo.disk(disk); partInfo.partition(part); + + std::string diskLabel(trim_label(label)); + strcpy(label, diskLabel.c_str()); partInfo.label(checkForRename(label, partInfo.toHdStr().c_str())); std::replace(fsType, fsType+strlen(fsType), '_', ' ' ); partInfo.fsType(fsType); - std::string diskLabel(trim(label)); - if (diskLabel=="" && partInfo.fsType()!="EFI" && partInfo.fsType()!="Apple partition map") { + + if (diskLabel=="" && partInfo.fsType()!="EFI" && partInfo.fsType()!="Apple partition map" && partInfo.fsType()!="FDisk partition scheme" && partInfo.fsType()!="GUID partition scheme") { diskLabel="Untitled"; } bool found=false; Index: trunk/ChameleonPrefPane/Sources/string_util.h =================================================================== --- trunk/ChameleonPrefPane/Sources/string_util.h (revision 120) +++ trunk/ChameleonPrefPane/Sources/string_util.h (revision 121) @@ -26,9 +26,18 @@ inline std::string trim_right(const std::string &source , const std::string& substr = " ") { std::string str = source; + return str.erase( str.find_last_not_of(substr) + 1); } + +inline std::string trim_label(const std::string &source ) +{ + std::string str = source; + std::string str2 = str.erase( str.find_last_not_of("*") + 1); + return str2.erase( str2.find_last_not_of(" ") + 1); +} + /** * trim the space chars (or any substring) on the left of a string */ Index: trunk/ChameleonPrefPane/Resources/cham.png =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream