public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] proj/portage-utils:master commit in: /
@ 2018-04-01 10:22 99% Fabian Groffen
  0 siblings, 0 replies; 1+ results
From: Fabian Groffen @ 2018-04-01 10:22 UTC (permalink / raw
  To: gentoo-commits

commit:     cd7c5018d4bffa34bd5aab6848525fd83d392de7
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  1 10:20:12 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Apr  1 10:20:12 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=cd7c5018

read_portage_env_file: properly ignore backup files

backup files are suffixed by '~', not prefixed

 main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 85740b8..023b42e 100644
--- a/main.c
+++ b/main.c
@@ -670,7 +670,8 @@ read_portage_env_file(const char *configroot, const char *file, env_vars vars[])
 		/* recurse through all files */
 		for (di = 0; di < dentslen; di++) {
 			d = dents[di];
-			if (d->d_name[0] == '.' || d->d_name[0] == '~')
+			if (d->d_name[0] == '.' || d->d_name[0] == '\0' ||
+					d->d_name[strlen(d->d_name) - 1] == '~')
 				continue;
 			snprintf(npath, sizeof(npath), "%s/%s", file, d->d_name);
 			read_portage_env_file(configroot, npath, vars);


^ permalink raw reply related	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-04-01 10:22 99% [gentoo-commits] proj/portage-utils:master commit in: / Fabian Groffen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox