about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/nix-http-export.cgi.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/nix-http-export.cgi.in b/scripts/nix-http-export.cgi.in
index 89df8b1446cf..6584524c4d70 100755
--- a/scripts/nix-http-export.cgi.in
+++ b/scripts/nix-http-export.cgi.in
@@ -30,7 +30,7 @@ if [ "$needed_path" != "${needed_path%.drv}" ]; then
 	exit
 fi
 
-if [ -e "$full_path" ]; then
+if [ @bindir@/nix-store --check-validity "$full_path" ]; then
 	if ! [ -e nix-export/"$needed_path".nar.gz ]; then
 		@bindir@/nix-store --export "$full_path" | @gzip@ > "$TMP_DIR"/"$needed_path".nar.gz
 		@coreutils@/ln -fs  "$TMP_DIR"/"$needed_path".nar.gz nix-export/"$needed_path".nar.gz