varför öppen källkod äger stängd
goddagens.
häromdagen så upptäckte jag en bugg i pythons tarfile modul och behövde en snabb fix så jag ögnade igenom källkoden och lyckades fixa det efter ett par minuter. nu fixade jag det iofs på fel sätt men som tur var så stog utvecklarens epost i filen och här är ett utdrag ur konversationen.
Lars Gustäbel wrote:
On Sat, Oct 14, 2006 at 08:13:05PM +0200, Jens Persson wrote:
> > Thanks for your work on Pythons Tarfile module. I just have a little
> > problem with it. When you save files which paths are exactly 100 chars
> > one char is getting stripped off. Now I made a fix on line 1403:
> > if len(tarinfo.name) >= LENGTH_NAME:
Sorry for the late reply, and thank you very much for your
report. This is a serious bug that affects tarfile 0.8.0 and
Python >= 2.5 as well.
> > That seems to work for now. If you want me to file a bug report in some
> > other place just say so.
Thanks, I just created a patch in Python's tracker on Sourceforge:
http://sourceforge.net/tracker/index.php?func=detail&aid=1583...
You can apply said patch or simply replace the stn() function in
tarfile.py to fix your problem:
def stn(s, length):
return s[:length] + (length - len(s)) * NUL
Thanks again,
Lars Gustäbel wrote:
On Tue, Oct 24, 2006 at 03:02:10PM +0200, Jens Persson wrote:
> > Thanks for your fix and don't worry about the time. It works beutifully.
Hi, Jens.
Pleased to hear that it works for you now.
> > Anyway, I got one more bug for you. If you save files which paths are
> > longer than 100 chars and on that same tarfile object runs:
> >
> > members = tar.getmembers()
> > for i in members:
> > print i.name
> >
> > those filenames are not working correctly. They are getting stripped
> > off. If you close the tarfile object and opens it in read mode it works
> > as it should.
I was in contact with another guy today who somehow had a
similar problem. I am aware of it, and will soon post a patch
to Python's tracker that will fix it.
Regards,
Jens Persson wrote:
Ok thanks. This last bug is not critical for me so I just wait for python-2.5.1 to be released.
Greets Jens
hade detta varit stängd källkod så hade man säkerligen fått dras med denna buggen livet ut. och de flesta utvecklare är faktiskt riktigt trevliga även om vissa tror att man är l33t om man uppför sig som ett rövhål.