Replace FindFirst() == 0 with StartsWith()
Thanks PulkoMandy.
This commit is contained in:
parent
c425d6cb85
commit
ab97fc0564
@ -278,7 +278,7 @@ KeyCommandMap::MessageReceived(BMessage* message)
|
||||
bool foundAddOn = false;
|
||||
int32 count = paths.CountStrings();
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
if (command.FindFirst(paths.StringAt(i)) == 0) {
|
||||
if (command.StartsWith(paths.StringAt(i))) {
|
||||
foundAddOn = true;
|
||||
break;
|
||||
}
|
||||
|
@ -326,7 +326,7 @@ BDeskWindow::ApplyShortcutPreferences(bool update)
|
||||
BPathFinder::FindPaths(B_FIND_PATH_ADD_ONS_DIRECTORY,
|
||||
"Tracker/", addOnPaths);
|
||||
for (int32 i = 0; i < addOnPaths.CountStrings(); i++) {
|
||||
if (command.FindFirst(addOnPaths.StringAt(i)) == 0) {
|
||||
if (command.StartsWith(addOnPaths.StringAt(i))) {
|
||||
isInAddons = true;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user