summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Scipione <jscipione@gmail.com>2017-02-22 03:10:16 (GMT)
committerJohn Scipione <jscipione@gmail.com>2017-02-22 03:20:03 (GMT)
commite4e6315ff4341c77efbf575dac1502b349aeecb1 (patch)
tree40a27fd1ca6bd7a259d46289afce6dfbd6ad2003
parentcc04d41c87185185701f12f02c01c17a3af775d2 (diff)
PackageInstaller: Use newly created BString::IEndsWith()HEADhrev50971master
...to find files with .pdb extension Code was subtly wrong in 2 cases: 1) File that ended in pdb but not an extension e.g. filepdb erroneously included 2) File that ended in .PDB or other case erroneously skipped
-rw-r--r--src/apps/packageinstaller/UninstallView.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/apps/packageinstaller/UninstallView.cpp b/src/apps/packageinstaller/UninstallView.cpp
index e3fc522..35c0217 100644
--- a/src/apps/packageinstaller/UninstallView.cpp
+++ b/src/apps/packageinstaller/UninstallView.cpp
@@ -361,8 +361,8 @@ UninstallView::_ReloadAppList()
if (iter.GetNodeRef(&ref) != B_OK)
continue;
- size_t len = strnlen(filename, B_FILE_NAME_LENGTH);
- if (len < 3 || strncmp(filename + (len - 3), "pdb", 3) != 0) {
+ BString filenameString(filename);
+ if (!filenameString.IEndsWith(".pdb")) {
printf("Ignoring non-package '%s'\n", filename);
continue;
}