File 0003-Don-t-skip-files-that-have-no-archive-attribute-set.patch of Package fatcat
From 0191657d53f58ddcaef55f91f3107125a32dff17 Mon Sep 17 00:00:00 2001
From: Vitaly Sinilin <vs@kp4.ru>
Date: Sun, 6 May 2018 12:55:14 +0300
Subject: [PATCH] Don't skip files that have no archive attribute set
There is nothing incorrent for the file not to have the archive
attribute set while having some other attributes.
This will fix skipping hidden/system files that don't have the
archive attribute set.
[Rebased by Arachnos]
---
src/core/FatEntry.cpp | 4 ----
src/core/FatEntry.h | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/core/FatEntry.cpp b/src/core/FatEntry.cpp
index e07a8fa..a45bbd9 100644
--- a/src/core/FatEntry.cpp
+++ b/src/core/FatEntry.cpp
@@ -95,10 +95,6 @@ bool FatEntry::printable(unsigned char c)
bool FatEntry::isCorrect()
{
- if (attributes && !(attributes&FAT_ATTRIBUTES_DIR) && !(attributes&FAT_ATTRIBUTES_FILE)) {
- return false;
- }
-
if (isDirectory() && cluster == 0 && getFilename()!="..") {
return false;
}
diff --git a/src/core/FatEntry.h b/src/core/FatEntry.h
index 66f3b8d..8ab1242 100644
--- a/src/core/FatEntry.h
+++ b/src/core/FatEntry.h
@@ -21,7 +21,7 @@ using namespace std;
#define FAT_ATTRIBUTES_DIR (1<<4)
#define FAT_ATTRIBUTES_VOLUME_ID 0x8
#define FAT_ATTRIBUTES_LONGFILE (0xf)
-#define FAT_ATTRIBUTES_FILE (0x20)
+#define FAT_ATTRIBUTES_ARCHIVE (0x20)
// Prefix used for erased files
#define FAT_ERASED 0xe5
--
2.33.0