Skip to content

Commit 55d6fb3

Browse files
author
Kazuki Suzuki Przyborowski
committed
Update pycatfile.py
1 parent cc22646 commit 55d6fb3

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

pycatfile.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,28 +419,29 @@ def decode_unicode_escape(value):
419419
"BLOCK": 4,
420420
"DIR": 5,
421421
"FIFO": 6,
422-
"FILE_ALT": 7, # treated like regular file
422+
"CONTAGIOUS": 7, # treated like regular file
423423
"SOCK": 8,
424424
"DOOR": 9,
425425
"PORT": 10,
426426
"WHT": 11,
427+
"SPARSE": 12,
427428
"JUNCTION": 13,
428429
}
429430

430-
# Base category for each concrete ftype (no unions here).
431431
BASE_CATEGORY_BY_CODE = {
432432
0: "files",
433-
7: "files",
434433
1: "hardlinks",
435434
2: "symlinks",
436-
3: "character",
437-
4: "block",
435+
3: "characters",
436+
4: "blocks",
438437
5: "directories",
439-
6: "fifo",
438+
6: "fifos",
439+
7: "files", # contagious treated as file
440440
8: "sockets",
441441
9: "doors",
442442
10: "ports",
443443
11: "whiteouts",
444+
12: "sparsefiles",
444445
13: "junctions",
445446
}
446447

@@ -454,7 +455,7 @@ def decode_unicode_escape(value):
454455
CATEGORY_ORDER = [
455456
"files", "hardlinks", "symlinks", "character", "block",
456457
"directories", "fifo", "sockets", "doors", "ports",
457-
"whiteouts", "junctions", "links", "devices"
458+
"whiteouts", "sparsefiles", "junctions", "links", "devices"
458459
]
459460

460461
# Robust bitness detection

0 commit comments

Comments
 (0)