← Back to index
|
Original Bugzilla link
Bug 1694 – Zip::ArchiveMember::name format bug
Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-11-25T23:40:00Z
Last change time
2015-06-09T01:14:23Z
Assigned to
bugzilla
Creator
wqeqweuqy
Comments
Comment #0
by wqeqweuqy — 2007-11-25T23:40:12Z
ArchiveMember class in the Zip package is storing file names as formatted arrays of ascii numbers. Kinda a trivial bug, but whatever heh. example: foreach (ArchiveMember am; directory) { .printf("%s", "name: "); foreach (char c; am.name) .printf(" %c ", c); .printf("%s", "\n"); } name: [ 1 1 5 , 1 0 1 , 1 1 6 , 1 1 6 , 1 0 5 , 1 1 0 , 1 0 3 , 1 1 5 , 4 6 , 1 0 5 , 1 1 0 , 1 0 5 ]
Comment #1
by wqeqweuqy — 2007-11-26T00:04:53Z
looks like this cast is whats breaking it: de.name = to!(string) (data[i .. i + namelen]); this fixes it: de.name = cast(invariant(char)[]) data[i .. i + namelen];
Comment #2
by bugzilla — 2008-01-02T19:49:06Z
Fixed dmd 2.009