We may see .tar files because that is what we used before .w2p was
introduced.

We should only gerenate .w2p but we want to
read .tar, .tar.gz, .tgz, .w2p

This

  filename[-7:] == '.tar.gz'

will not cause an exception for short filenames but endswith is a
better solution.

On Dec 10, 4:37 pm, Jonathan Lundell <[email protected]> wrote:
> On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote:
>
> > On Dec 10, 2:12 pm, Thadeus Burgess <[email protected]> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to