Skip to content

Commit f822214

Browse files
author
Kazuki Suzuki Przyborowski
committed
Update pyfoxfile.py
1 parent c09bbfd commit f822214

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

pyfoxfile.py

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

429-
# Base category for each concrete ftype (no unions here).
430430
BASE_CATEGORY_BY_CODE = {
431431
0: "files",
432-
7: "files",
433432
1: "hardlinks",
434433
2: "symlinks",
435-
3: "character",
436-
4: "block",
434+
3: "characters",
435+
4: "blocks",
437436
5: "directories",
438-
6: "fifo",
437+
6: "fifos",
438+
7: "files", # contagious treated as file
439439
8: "sockets",
440440
9: "doors",
441441
10: "ports",
442442
11: "whiteouts",
443+
12: "sparsefiles",
443444
13: "junctions",
444445
}
445446

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

459460
# Robust bitness detection

0 commit comments

Comments
 (0)