[Yanel-dev] org.wyona.yarep.impl.repo.vfs.VirtualFileSystemRepository#getNode(java.lang.String) question

Cedric Staub cedric.staub at wyona.com
Mon Sep 6 11:09:42 CEST 2010


On Sun, Sep 05, 2010 at 12:21:51AM +0200, Michael Wechner wrote:
> I have reviewed your patch, but to be honest it is still not clear to me 
> what the actual issue is
> and how your patch is supposed to solve this issue without creating 
> other issues.

In general I agree with his solution. If I understand it correctly, it
just makes sure the trailing slash is always stripped in order to avoid
a double-slash somewhere.

The only problem of course is: do other functions/clients depend on the
incorrect behaviour and will they break by applying this patch? Well I
don't know and we probaly never will unless we actually try it.

> I think according to your very first email we rather have to fix
> 
> String childPath = getPath() + "/" + name;
> 
> within AbstractNode by checking if getPath().equals("/") and if true, 
> then not
> append the slash, such that one does not end up with 
> "//hello_world.txt", but rather with "/hello_world.txt".

Certainly the safer solution, but also kind of a workaround.

Cheers
Cedric


More information about the Yanel-development mailing list