On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: > On Dec 10, 2:12 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: >> I see, Massmo, I checked my emails and I had sent you the wrong patch, >> it only included the fix for content-type of the admin application, >> instead of the logic that allows you to install an app with a .gz >> extension as well just in case. >> >> When I get home, I will send you this second part of the patch >.< >> >> -Thadeus > > This is an excellent example of why web2py process would benefit from > the code-review cycle (extra eyes - even your own - are useful; we are > all busy, so things get missed; also the community is generally > "smarter" than any one of us, so additional eyes can be beneficial, > although limiting reviews to a small number of people has benefit).
It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.