[jcifs] Re: Crazy Copy Tests
Michael B Allen
mba2000 at ioplex.com
Fri Aug 19 21:07:58 GMT 2005
On Mon, 15 Aug 2005 14:15:41 -0400
Michael B Allen <mba2000 at ioplex.com> wrote:
> On Mon, 15 Aug 2005 04:05:05 +0200
> Thomas Bley <thomas.bley at simple-groupware.de> wrote:
>
> > Hi Mike, hi all,
> >
> > I am doing some crazy tests at the moment:
> > 1)
> > SmbFile from = new SmbFile(
> > "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/" );
> > SmbFile to = new SmbFile(
> > "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/" );
> > from.copyTo( to );
> >
> > This code sets all files in asd2 to 0kb size.
> >
> > 2)
> > SmbFile from = new SmbFile(
> > "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/" );
> > SmbFile to = new SmbFile(
> > "smb://administrator:aaa@192.168.63.1:139/administrator/asd2/existingdir/"
> > );
> > from.copyTo( to );
> >
> > This causes a big recursion with many "existingdir" copied into each
> > other, e.g. you get asd2/existingdir/existingdir/existingdir/ ...
> > On a windows or samba server this is no problem, the path length has a
> > maximum of ~500 characters, samba has ~1000 characters, but NetApp has
> > no limit ...
> >
> > Do you think these cases should be stopped by jCIFS or the rather the
> > program that uses the library like my webdisk ?
>
> I think I can block these. Pls check the next release to see if my
> modifications are satisfactory.
This is fixed in 1.2.2 to be released RSN. Trying to use a source path
that is a parent of, decendant of, or equal to the destination path will
fail immediately before anything is copied with the error: "Source and
destination paths overlap."
Mike
More information about the jcifs
mailing list