Skip to content

Commit 642e245

Browse files
authored
Merge pull request #67 from HiraokaHyperTools/fix-missing-unallocated-entries
Fix msgreader may fail loading on edited msg file
2 parents dd4e0cc + 3a4bab4 commit 642e245

6 files changed

Lines changed: 847 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kenjiuno/msgreader",
3-
"version": "1.27.1-alpha.1",
3+
"version": "1.27.1",
44
"description": "Outlook Item File (.msg) reader in JavaScript Npm Module",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",

src/Reader.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,18 @@ export class Reader {
198198
case CONST.MSG.PROP.TYPE_ENUM.DOCUMENT:
199199
props.push(this.convertProperty(propertyOffset));
200200
break;
201+
case CONST.MSG.PROP.TYPE_ENUM.UNALLOCATED:
202+
default:
203+
props.push({
204+
type: propertyType,
205+
name: '',
206+
previousProperty: -1,
207+
nextProperty: -1,
208+
childProperty: -1,
209+
startBlock: 0,
210+
sizeBlock: 0,
211+
});
212+
break;
201213
}
202214

203215
propertyOffset += CONST.MSG.PROP.PROPERTY_SIZE;

src/const.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default {
3939
START_BLOCK_OFFSET: 0x74,
4040
SIZE_OFFSET: 0x78,
4141
TYPE_ENUM: {
42+
UNALLOCATED: 0,
4243
DIRECTORY: 1,
4344
DOCUMENT: 2,
4445
ROOT: 5

0 commit comments

Comments
 (0)