[haiku-commits] haiku: hrev53483 - src/apps/installer

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 14 Sep 2019 00:40:55 -0400 (EDT)

hrev53483 adds 1 changeset to branch 'master'
old head: b9fc38d9a448f7ac5e1fa09c1fd93c0a53fbfd2b
new head: 7ba58efd3a54fd63b639bb6c74866e7041ab0dad
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=7ba58efd3a54+%5Eb9fc38d9a448

----------------------------------------------------------------------------

7ba58efd3a54: Installer: Skip block, character, FIFO, and socket devices/files.
  
  Fixes #15019.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53483
Commit:      7ba58efd3a54fd63b639bb6c74866e7041ab0dad
URL:         https://git.haiku-os.org/haiku/commit/?id=7ba58efd3a54
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Sep 14 04:40:30 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/15019

----------------------------------------------------------------------------

1 file changed, 6 insertions(+)
src/apps/installer/WorkerThread.cpp | 6 ++++++

----------------------------------------------------------------------------

diff --git a/src/apps/installer/WorkerThread.cpp 
b/src/apps/installer/WorkerThread.cpp
index f1aa7badaa..851014e390 100644
--- a/src/apps/installer/WorkerThread.cpp
+++ b/src/apps/installer/WorkerThread.cpp
@@ -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;


Other related posts:

  • » [haiku-commits] haiku: hrev53483 - src/apps/installer - waddlesplash