about summary refs log tree commit diff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r--src/libexpr/parser.y10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index 7236bab19ce5..b0c54339b051 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -15,10 +15,6 @@
    stuff.  So allow it to be excluded. */
 #ifndef BISON_HEADER_HACK
 #define BISON_HEADER_HACK
-    
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 #include "util.hh"
     
@@ -28,6 +24,10 @@
 #include "lexer-tab.hh"
 #define YYSTYPE YYSTYPE // workaround a bug in Bison 2.4
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 
 using namespace nix;
 
@@ -480,8 +480,6 @@ Expr * parseExprFromFile(EvalState & state, Path path)
     }
 
     /* If `path' refers to a directory, append `/default.nix'. */
-    if (stat(path.c_str(), &st))
-        throw SysError(format("getting status of `%1%'") % path);
     if (S_ISDIR(st.st_mode))
         path = canonPath(path + "/default.nix");