Piotr Tabor - 2008-03-27

Logged In: YES
user_id=2047869
Originator: YES

Corrected patch:

diff -rc org/src/DB.cs cdcollect-0.6.0/src/DB.cs
*** org/src/DB.cs 2006-11-24 18:12:13.000000000 +0100
--- cdcollect-0.6.0/src/DB.cs 2008-03-27 23:47:33.000000000 +0100
***************
*** 212,217 ****
--- 212,218 ----
dir = new DirectoryInfo(dirname);
int nfiles = 0;

+ try{
if (dir.Exists) {

DirectoryInfo [] dirs = dir.GetDirectories();
***************
*** 223,228 ****
--- 224,231 ----
nfiles += files.Length;

}
+ }catch{
+ }
return(nfiles);
}

***************
*** 237,246 ****
int i,j;
DirectoryInfo dir = new DirectoryInfo (dirname);
Hashtable filelist = new Hashtable ();
-
if (dir.Exists) {
!
! DirectoryInfo [] dirs = dir.GetDirectories();
for (i=0; i<dirs.Length; i++) {

/* Create path of current file */
--- 240,252 ----
int i,j;
DirectoryInfo dir = new DirectoryInfo (dirname);
Hashtable filelist = new Hashtable ();
if (dir.Exists) {
! DirectoryInfo [] dirs;
! try{
! dirs = dir.GetDirectories();
! }catch{
! return(filelist);
! }
for (i=0; i<dirs.Length; i++) {

/* Create path of current file */