Yes it is the problem of trailing slash. Yes I do know about s[-1] as
you expected but it would be slightly round about way. Thank you too
for doing all the reiterations. If I can just nail down the image
scaling thing we are in good shape. I will probably not be able to get
to it until a couple of days though.

Chandan


On 1/5/07, Duncan Webb <[EMAIL PROTECTED]> wrote:
> Chandan Pitta wrote:
> > This patch should fix the issue seen by Pascal. I also did some minor
> > clean up in webserver.
>
> Is this the problem of a trailing slash? if so the last character of a
> string can be accessed by s[-1], but you know this.
>
> Thanks again Chandan, patch applied to rel-1 at r8936
>
> Thanks
> Duncan
>
> >
> > Thanks
> > Chandan
> >
> >
> >
> > On 1/4/07, Duncan Webb <[EMAIL PROTECTED]> wrote:
> >> Jason Tackaberry wrote:
> >> >>> Remember none of the items should have trailing slash.
> >> >> This is a bug that ought to be fixed.
> >> >
> >> > Nevermind; you just said as much in your original email. :)
> >>
> >> Jason have you noticed that:
> >>
> >> image = kaa.imlib2.open(filename)
> >> thumb = image.scale_preserve_aspect(config.WWW_IMAGE_THUMBNAIL_SIZE)
> >> thumb.save(thumb_path)
> >>
> >> doesn't work when config.WWW_IMAGE_THUMBNAIL_SIZE is not square, ie
> >> (100, 200)
> >>
> >> Duncan
> >>
> >>
> >> -------------------------------------------------------------------------
> >> Take Surveys. Earn Cash. Influence the Future of IT
> >> Join SourceForge.net's Techsay panel and you'll get the chance to
> >> share your
> >> opinions on IT & business topics through brief surveys - and earn cash
> >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >> _______________________________________________
> >> Freevo-devel mailing list
> >> Freevo-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/freevo-devel
> >>
> >
> > ------------------------------------------------------------------------
> >
> > Index: src/www/htdocs/fileinfo.rpy
> > ===================================================================
> > --- src/www/htdocs/fileinfo.rpy (revision 8930)
> > +++ src/www/htdocs/fileinfo.rpy (working copy)
> > @@ -167,7 +167,11 @@
> >          for i in range(len(self.allowed_dirs)):
> >              val = self.allowed_dirs[i][1]
> >              if dir_str.startswith(val):
> > -                return val.replace("/", "_") + dir_str[len(val):]
> > +                child_res = val.replace("/", "_")
> > +                location = dir_str[len(val):]
> > +                if not location[0] == "/":
> > +                    child_res += "/"
> > +                return child_res + location
> >          return dir_str
> >
> >
> > Index: src/www/htdocs/library.rpy
> > ===================================================================
> > --- src/www/htdocs/library.rpy  (revision 8930)
> > +++ src/www/htdocs/library.rpy  (working copy)
> > @@ -87,9 +87,12 @@
> >                  if dir_str.startswith(val):
> >                      child_res = val
> >                      break
> > +        child_res = child_res.replace("/", "_")
> > +        location = dir_str[len(child_res):]
> > +        if not location[0] == "/":
> > +            child_res += "/"
> > +        return child_res + location
> >
> > -        return child_res.replace("/", "_") + dir_str[len(child_res):]
> > -
> >      def get_suffixes (self, media):
> >          print 'get_suffixes (self, media=\"%s\")' % (media)
> >          suffixes = []
> > Index: src/helpers/webserver.py
> > ===================================================================
> > --- src/helpers/webserver.py    (revision 8930)
> > +++ src/helpers/webserver.py    (working copy)
> > @@ -92,20 +92,17 @@
> >
> >      root = static.File(docRoot)
> >      root.processors = { '.rpy': script.ResourceScript, }
> > -    for item in config.VIDEO_ITEMS:
> > +
> > +    child_resources = []
> > +    child_resources.extend(config.VIDEO_ITEMS)
> > +    child_resources.extend(config.AUDIO_ITEMS)
> > +    child_resources.extend(config.IMAGE_ITEMS)
> > +    child_resources.extend( [ ('Recorded TV', config.TV_RECORD_DIR) ])
> > +    child_resources.extend( [ ('Webserver Cache', 
> > config.WEBSERVER_CACHEDIR) ])
> > +    for item in child_resources:
> >          if isinstance(item, tuple) and len(item) == 2:
> >              (title, path) = item
> >              root.putChild(path.replace("/", "_"), static.File(path))
> > -    for item in config.AUDIO_ITEMS:
> > -        if isinstance(item, tuple) and len(item) == 2:
> > -            (title, path) = item
> > -            root.putChild(path.replace("/", "_"), static.File(path))
> > -    for item in config.IMAGE_ITEMS:
> > -        if isinstance(item, tuple) and len(item) == 2:
> > -            (title, path) = item
> > -            root.putChild(path.replace("/", "_"), static.File(path))
> > -    root.putChild(config.TV_RECORD_DIR.replace("/", "_"), 
> > static.File(config.TV_RECORD_DIR))
> > -    root.putChild(config.WEBSERVER_CACHEDIR.replace("/", "_"), 
> > static.File(config.WEBSERVER_CACHEDIR))
> >
> >      root.putChild('vhost', vhost.VHostMonsterResource())
> >      rewriter =  rewrite.RewriterResource(root, helpimagesrewrite)
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys - and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Freevo-devel mailing list
> > Freevo-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/freevo-devel
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Freevo-devel mailing list
> Freevo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freevo-devel
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
Freevo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to