[haiku-commits] haiku: hrev49259 - src/bin

  • From: jessica.l.hamilton@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 10 Jun 2015 04:16:56 +0200 (CEST)

hrev49259 adds 1 changeset to branch 'master'
old head: ae59605d24d5ff1e9d795f8551fa9d46a9f05e12
new head: a5bc477663a7f007f14c46ea34c65f758dacfbf4
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=a5bc477663a7+%5Eae59605d24d5

----------------------------------------------------------------------------

a5bc477663a7: setarch: fix generation of new PATH environment variable.

* The insertion index didn't take into account the fact
that some paths don't get added before the index is
calculated. This resulted in the requested arch paths
ending up in reverse if we were already in the
requested arch environment.

Fixes #12125.

[ Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision: hrev49259
Commit: a5bc477663a7f007f14c46ea34c65f758dacfbf4
URL: http://cgit.haiku-os.org/haiku/commit/?id=a5bc477663a7
Author: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Date: Wed Jun 10 02:12:30 2015 UTC

Ticket: https://dev.haiku-os.org/ticket/12125

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/bin/setarch.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/bin/setarch.cpp b/src/bin/setarch.cpp
index 44c27be..567e754 100644
--- a/src/bin/setarch.cpp
+++ b/src/bin/setarch.cpp
@@ -109,7 +109,7 @@ compute_new_paths(const char* architecture, BStringList&
_paths)
int32 index = primaryBinDirectories.IndexOf(path);
if (index >= 0) {
if (insertionIndex < 0)
- insertionIndex = i;
+ insertionIndex = _paths.CountStrings();
} else if (!is_primary_architecture(
guess_architecture_for_path(path))) {
// a non-primary architecture path -- skip


Other related posts:

  • » [haiku-commits] haiku: hrev49259 - src/bin - jessica . l . hamilton