forked from lix-project/lix
Improved error message when encountering unsupported file types
Fixes #269.
This commit is contained in:
parent
6bb4c0b712
commit
2a4dbcff74
|
@ -551,9 +551,9 @@ static void canonicalisePathMetaData_(const Path & path, uid_t fromUid, InodesSe
|
||||||
if (lstat(path.c_str(), &st))
|
if (lstat(path.c_str(), &st))
|
||||||
throw SysError(format("getting attributes of path ‘%1%’") % path);
|
throw SysError(format("getting attributes of path ‘%1%’") % path);
|
||||||
|
|
||||||
/* Really make sure that the path is of a supported type. This
|
/* Really make sure that the path is of a supported type. */
|
||||||
has already been checked in dumpPath(). */
|
if (!(S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode)))
|
||||||
assert(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
|
/* Fail if the file is not owned by the build user. This prevents
|
||||||
us from messing up the ownership/permissions of files
|
us from messing up the ownership/permissions of files
|
||||||
|
|
Loading…
Reference in a new issue