Skip to content

Commit 9660f57

Browse files
committed
File detection tweak
1 parent 53d2f05 commit 9660f57

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

modules/ModManager.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,18 @@ void ModManager::DeactivateButton_isPressed() {
410410
for (std::string fileline : UniqueList) {
411411
conflictfilecount = 0;
412412
for (int i = 0; i < FileList.size(); i++) {
413-
if (FileList[i].contains(fileline))
413+
414+
std::size_t comma_pos = fileline.find(',');
415+
std::string relative_string;
416+
if (comma_pos != std::string::npos) {
417+
relative_string = fileline.substr(0, comma_pos);
418+
} else {
419+
relative_string = fileline;
420+
}
421+
422+
if (FileList[i].contains(relative_string))
414423
conflictfilecount = conflictfilecount + 1;
424+
415425
if (conflictfilecount > 1) {
416426
hasconflict = true;
417427
break;

0 commit comments

Comments
 (0)