about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-10-30T16·10+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-10-30T16·10+0000
commit442b09ea33dcf516a6f5244ed2c362682e1347b0 (patch)
treea74bb2a8757f56f83f4a3127243e6701e4385558
parent933b3f677d0338b264d4e758f8932bb7f2454c46 (diff)
* Don't use a search path.
-rw-r--r--src/fix-ng/fix.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fix-ng/fix.cc b/src/fix-ng/fix.cc
index e13413bb4ad4..05e27c506b34 100644
--- a/src/fix-ng/fix.cc
+++ b/src/fix-ng/fix.cc
@@ -31,6 +31,7 @@ static Expr evalFile(EvalState & state, const Path & path);
 static Expr evalExpr(EvalState & state, Expr e);
 
 
+#if 0
 static Path searchPath(const Paths & searchDirs, const Path & relPath)
 {
     if (string(relPath, 0, 1) == "/") return relPath;
@@ -46,6 +47,7 @@ static Path searchPath(const Paths & searchDirs, const Path & relPath)
         format("path `%1%' not found in any of the search directories")
         % relPath);
 }
+#endif
 
 
 static Expr substExpr(string x, Expr rep, Expr e)
@@ -259,7 +261,7 @@ static Expr evalExpr2(EvalState & state, Expr e)
 
     /* Relative files. */
     if (ATmatch(e, "Relative(<str>)", &s1)) {
-        Path srcPath = searchPath(state.searchDirs, s1);
+        Path srcPath = s1;
         Path dstPath = addToStore(srcPath);
 
         ClosureElem elem;
@@ -401,9 +403,8 @@ static Expr evalExpr(EvalState & state, Expr e)
 }
 
 
-static Expr evalFile(EvalState & state, const Path & relPath)
+static Expr evalFile(EvalState & state, const Path & path)
 {
-    Path path = searchPath(state.searchDirs, relPath);
     Nest nest(lvlTalkative, format("evaluating file `%1%'") % path);
     Expr e = parseExprFromFile(path);
     return evalExpr(state, e);
@@ -476,7 +477,7 @@ void run(Strings args)
     for (Strings::iterator it = files.begin();
          it != files.end(); it++)
     {
-        Expr e = evalFile(state, *it);
+        Expr e = evalFile(state, absPath(*it));
         printNixExpr(state, e);
     }
 }