Index: libucdf/tester.c =================================================================== --- libucdf/tester.c (revision 35424) +++ libucdf/tester.c (revision 35425) @@ -6,7 +6,7 @@ ucdf_direntry_t *d; for(n = 0; n < level; n++) putc(' ', stdout); - printf("%s [%d] %ld @%ld\n", dir->name, dir->type, dir->size, dir->first); + printf("%s [%d] %c%ld @%ld\n", dir->name, dir->type, (dir->is_short ? 'S' : 'L'), dir->size, dir->first); for(d = dir->children; d != NULL; d = d->next) print_dir(ctx, d, level+1); } Index: libucdf/ucdf.c =================================================================== --- libucdf/ucdf.c (revision 35424) +++ libucdf/ucdf.c (revision 35425) @@ -144,8 +144,10 @@ safe_read(buff, 4); ctx->dir_first = load_int(ctx, buff, 4); - safe_seek(60); + safe_seek(56); safe_read(buff, 4); + ctx->long_stream_min_size = load_int(ctx, buff, 4); + safe_read(buff, 4); ctx->ssat_first = load_int(ctx, buff, 4); safe_read(buff, 4); ctx->ssat_len = load_int(ctx, buff, 4); @@ -290,6 +292,7 @@ utf16_to_ascii(de->name, sizeof(de->name), buf); de->size = load_int(ctx, buf+120, 4); + de->is_short = de->size < ctx->long_stream_min_size; leftid = load_int(ctx, buf+68, 4); rightid = load_int(ctx, buf+72, 4); rootid = load_int(ctx, buf+76, 4); Index: libucdf/ucdf.h =================================================================== --- libucdf/ucdf.h (revision 35424) +++ libucdf/ucdf.h (revision 35425) @@ -63,6 +63,7 @@ long dir_first; /* first sector ID of the directory stream */ long ssat_len, ssat_first; /* short allocation table */ long msat_len, msat_first; /* master allocation table */ + long long_stream_min_size; long *msat; /* the master SAT read into memory */ long *sat; /* the whole SAT assembled and read into memory; entries are indexed by sector ID and contain the next sector ID within the chain */