[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
248/376: Improved error message when encountering unsupported file types
From: |
Ludovic Courtès |
Subject: |
248/376: Improved error message when encountering unsupported file types |
Date: |
Wed, 28 Jan 2015 22:05:23 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 2a4dbcff74c9af467b6d21828468dbba860dd979
Author: Eelco Dolstra <address@hidden>
Date: Tue Oct 14 10:51:19 2014 +0200
Improved error message when encountering unsupported file types
Fixes #269.
---
src/libstore/local-store.cc | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc
index f91a088..f08c877 100644
--- a/src/libstore/local-store.cc
+++ b/src/libstore/local-store.cc
@@ -551,9 +551,9 @@ static void canonicalisePathMetaData_(const Path & path,
uid_t fromUid, InodesSe
if (lstat(path.c_str(), &st))
throw SysError(format("getting attributes of path ‘%1%’") % path);
- /* Really make sure that the path is of a supported type. This
- has already been checked in dumpPath(). */
- assert(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode));
+ /* Really make sure that the path is of a supported type. */
+ if (!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode)))
+ throw Error(format("file ‘%1%’ has an unsupported type") % path);
/* Fail if the file is not owned by the build user. This prevents
us from messing up the ownership/permissions of files
- 368/376: Fix build, (continued)
- 368/376: Fix build, Ludovic Courtès, 2015/01/28
- 369/376: Bla, Ludovic Courtès, 2015/01/28
- 294/376: Clean up temp roots in a more C++ way, Ludovic Courtès, 2015/01/28
- 287/376: Don't use ADDR_LIMIT_3GB, Ludovic Courtès, 2015/01/28
- 255/376: binary download: Use $NIX_CURL_FLAGS, Ludovic Courtès, 2015/01/28
- 301/376: 'build-cache-failures' -> 'build-cache-failure' in nix.conf documentation., Ludovic Courtès, 2015/01/28
- 275/376: Revert "Revert "Revert "Temporarily disable darwin builds while hydra's darwin is borked""", Ludovic Courtès, 2015/01/28
- 302/376: Don't claim FreeBSD support, Ludovic Courtès, 2015/01/28
- 274/376: Don't pull in git when doing a nix-shell, Ludovic Courtès, 2015/01/28
- 247/376: mkList: Scrub better, Ludovic Courtès, 2015/01/28
- 248/376: Improved error message when encountering unsupported file types,
Ludovic Courtès <=
- 295/376: nix-daemon: Call exit(), not _exit(), Ludovic Courtès, 2015/01/28
- 242/376: Add primop ‘attrValues’, Ludovic Courtès, 2015/01/28
- 254/376: nix-store -q: Check for conflicting flags, Ludovic Courtès, 2015/01/28
- 265/376: Merge pull request #380 from shlevy/temp-disable-darwin, Ludovic Courtès, 2015/01/28
- 253/376: nix-channel: Add --rollback flag, Ludovic Courtès, 2015/01/28
- 289/376: Document functors, Ludovic Courtès, 2015/01/28
- 259/376: Export realiseContext in libnixexpr, Ludovic Courtès, 2015/01/28
- 284/376: SSH.pm: Print a friendlier message if connecting fails, Ludovic Courtès, 2015/01/28
- 278/376: Typo, Ludovic Courtès, 2015/01/28
- 292/376: Add a test for the binary tarball installer, Ludovic Courtès, 2015/01/28