diff --git a/lib/install.c b/lib/install.c index db21894ec..deabd484b 100644 --- a/lib/install.c +++ b/lib/install.c @@ -223,7 +223,8 @@ int rpmInstallPackage(char * prefix, rpmdb db, int fd, int flags, prefixedFileList[i] = fileList[i]; instActions[i] = CREATE; - if (fileFlagsList[i] & RPMFILE_CONFIG) { + if ((fileFlagsList[i] & RPMFILE_CONFIG) && + !S_ISDIR(fileModesList[i])) { if (exists(prefixedFileList[i])) { message(MESS_DEBUG, "%s exists - backing up\n", prefixedFileList[i]);