Dont bother asking libmagic about directories
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Aug 2012 09:06:45 +0000 (12:06 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 1 Aug 2012 13:25:06 +0000 (16:25 +0300)
- There's no (relevant) additional information to be gained from passing
  directories to libmagic and we already have this info available in the
  file mode. This permits nice and easy handling of %ghost directories
  (related to RhBug:839656)

build/rpmfc.c

index f5082e3..94cbd4c 100644 (file)
@@ -954,7 +954,7 @@ rpmRC rpmfcClassify(rpmfc fc, ARGV_t argv, rpm_mode_t * fmode)
        case S_IFBLK:   ftype = "block special";        break;
        case S_IFIFO:   ftype = "fifo (named pipe)";    break;
        case S_IFSOCK:  ftype = "socket";               break;
-       case S_IFDIR:
+       case S_IFDIR:   ftype = "directory";            break;
        case S_IFLNK:
        case S_IFREG:
        default: