hungdluit / flowlib

Automatically exported from code.google.com/p/flowlib
0 stars 0 forks source link

Adding a set of folders into share #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to write dc client with share manager. I'm created sharing 
dialog like StrongDC - folder tree with ability to check needed folders.
After each check programm calls AddVirtualDir function of Share object.
If user selects several folders i have following error:

Argument Exception : 
Length of result array is too small. Check destIndex and length values and 
lower bound of array. 

in line

SortedList<string, ContentInfo> tmpShare = new SortedList<string, 
ContentInfo>(share);

(Share.cs line 696)

To reproduce this situation you can use following code:
Share s = new Share("my");
DirectoryInfo di=new DirectoryInfo("C:\\");
foreach (DirectoryInfo d in di.GetDirectories())
{
    s.AddVirtualDir(d.Name, d.FullName);
}

I'm using SVN version of flowlib from 4 feb 2009

OS: Windows Vista SP1, Windows XP Sp3

Original issue reported on code.google.com by hackw...@gmail.com on 10 Feb 2009 at 8:52

GoogleCodeExporter commented 8 years ago
Another question about share. When I'm creating share from filelist downloaded 
from 
user there is only one VirtualDir (dummy) in resulted share object. (by method 
CreateShare of filelist object) Is it normal? I am compelled to create 
objective 
model for display of structure of the loaded list.

Original comment by hackw...@gmail.com on 10 Feb 2009 at 9:03

GoogleCodeExporter commented 8 years ago
Can you try the attached file and see if it solves your problem.
Please give me feedback on speed also.

Your other question belongs in FAQ section. (But for this time. Yes it is 
normal :)

Original comment by blomman84 on 14 Feb 2009 at 1:57

Attachments:

GoogleCodeExporter commented 8 years ago
Now it's work correctly. At this point I cant give you speed feedback in 
numbers. 
Maybe 5-7 days later. It seems that it works very quickly.

Original comment by hackw...@gmail.com on 17 Feb 2009 at 4:45

GoogleCodeExporter commented 8 years ago
Fix added to svn.

Original comment by blomman84 on 19 Feb 2009 at 7:49