Installer: Skip block, character, FIFO, and socket devices/files.

Fixes #15019.
This commit is contained in:
Augustin Cavalier
2019-09-14 00:40:30 -04:00
parent b9fc38d9a4
commit 7ba58efd3a
+6
View File
@@ -117,6 +117,12 @@ public:
virtual bool ShouldCopyEntry(const BEntry& entry, const char* path,
const struct stat& statInfo, int32 level) const
{
if (S_ISBLK(statInfo.st_mode) || S_ISCHR(statInfo.st_mode)
|| S_ISFIFO(statInfo.st_mode) || S_ISSOCK(statInfo.st_mode)) {
printf("skipping '%s', it is a special file.\n", path);
return false;
}
if (fIgnorePaths.find(path) != fIgnorePaths.end()) {
printf("ignoring '%s'.\n", path);
return false;