[Calypso] [PATCH] Make sure data_path() doesn't end in a '/'

Jelmer Vernooij jelmer at jelmer.uk
Sun Jan 24 08:39:41 PST 2016


On Sun, Jan 24, 2016 at 12:39:15PM +0100, Petter Reinholdtsen wrote:
> 
> A third patch from Guido:
> 
>   We expect the same form url_path() in is_collection() and end up in an
>   endless loop otherwise.
>     
>   Found by caldav-testers CalDAV/get.xml
> 
> diff --git a/calypso/paths.py b/calypso/paths.py
> index d69b667..fe72e91 100644
> --- a/calypso/paths.py
> +++ b/calypso/paths.py
> @@ -43,7 +43,7 @@ def url_to_owner(path):
>  #
>  
>  def data_root():
> -    return os.path.expanduser(config.get("storage", "folder"))
> +    return os.path.expanduser(config.get("storage", "folder")).rstrip('/')

LGTM

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://keithp.com/pipermail/calypso/attachments/20160124/079cd30e/attachment.sig>


More information about the Calypso mailing list