Closed
Bug 322712
Opened 20 years ago
Closed 20 years ago
cannot export local attachments
Categories
(Bugzilla :: Attachments & Requests, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: LpSolit, Assigned: LpSolit)
Details
(Keywords: dataloss)
Attachments
(1 file)
|
605 bytes,
patch
|
myk
:
review+
|
Details | Diff | Splinter Review |
When moving bugs to another installation, attachments stored in data/attachments/ are not correctly exported. Looks like they are truncated. Seems a problem with Attachment::data().
| Assignee | ||
Comment 1•20 years ago
|
||
There is a missing "local $/;" in Attachment::data() when reading attachments stored in data/attachments. This truncates and corrupts them. That's what I call dataloss.
This method was introduced in bug 302669 which landed on 2.22 only.
Flags: blocking2.22?
Keywords: dataloss
Comment 2•20 years ago
|
||
Indeed, we need a "local $/;" statement before we read the data.
Frederic also asked me on IRC whether we really need "binmode". As far as I can tell from my reading of the binmode and PerlIO documentation, yes, we do need "binmode," although there may be some circumstances in which we don't want it (f.e. when dealing with text attachments if we want line ending translation on Windows machines).
http://perldoc.perl.org/functions/binmode.html
http://perldoc.perl.org/PerlIO.html
| Assignee | ||
Comment 3•20 years ago
|
||
add local $/;
Updated•20 years ago
|
Attachment #208006 -
Flags: review?(myk) → review+
| Assignee | ||
Updated•20 years ago
|
Flags: approval?
Updated•20 years ago
|
Flags: blocking2.22?
Flags: blocking2.22+
Flags: approval?
Flags: approval+
| Assignee | ||
Comment 4•20 years ago
|
||
Checking in Bugzilla/Attachment.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Attachment.pm,v <-- Attachment.pm
new revision: 1.30; previous revision: 1.29
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•