Skip to content

Commit 9d18b57

Browse files
author
Kazuki Suzuki Przyborowski
committed
Update pyarchivefile.py
1 parent 3301103 commit 9d18b57

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

pyarchivefile.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,28 +406,29 @@ def decode_unicode_escape(value):
406406
"BLOCK": 4,
407407
"DIR": 5,
408408
"FIFO": 6,
409-
"FILE_ALT": 7, # treated like regular file
409+
"CONTAGIOUS": 7, # treated like regular file
410410
"SOCK": 8,
411411
"DOOR": 9,
412412
"PORT": 10,
413413
"WHT": 11,
414+
"SPARSE": 12,
414415
"JUNCTION": 13,
415416
}
416417

417-
# Base category for each concrete ftype (no unions here).
418418
BASE_CATEGORY_BY_CODE = {
419419
0: "files",
420-
7: "files",
421420
1: "hardlinks",
422421
2: "symlinks",
423-
3: "character",
424-
4: "block",
422+
3: "characters",
423+
4: "blocks",
425424
5: "directories",
426-
6: "fifo",
425+
6: "fifos",
426+
7: "files", # contagious treated as file
427427
8: "sockets",
428428
9: "doors",
429429
10: "ports",
430430
11: "whiteouts",
431+
12: "sparsefiles",
431432
13: "junctions",
432433
}
433434

@@ -441,7 +442,7 @@ def decode_unicode_escape(value):
441442
CATEGORY_ORDER = [
442443
"files", "hardlinks", "symlinks", "character", "block",
443444
"directories", "fifo", "sockets", "doors", "ports",
444-
"whiteouts", "junctions", "links", "devices"
445+
"whiteouts", "sparsefiles", "junctions", "links", "devices"
445446
]
446447

447448
# Robust bitness detection

0 commit comments

Comments
 (0)