From 238d32ce8acb01c7533c48a22779d8748fa60eb5 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Sat, 11 Dec 2010 23:47:00 -0500 Subject: [PATCH] Check for special name "(local)" to mean "." When expanding a tree of footprints, we want the symbolic name "(local)" to mean the "." subdir. Now that we check for chdir() failures, we can no longer "just work" because the chdir didn't change directories. --- src/file.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/file.c b/src/file.c index bfe0de08..4e4d55d7 100644 --- a/src/file.c +++ b/src/file.c @@ -1157,7 +1157,11 @@ LoadNewlibFootprintsFromDir(char *libpath, char *toppath) return 0; } - strcpy (subdir, libpath); + if (strcmp (libpath, "(local)") == 0) + strcpy (subdir, "."); + else + strcpy (subdir, libpath); + if (chdir (subdir)) { ChdirErrorMessage (subdir); -- 2.11.4.GIT