2008-08-25, 18:06
rudeboyx Wrote:ok just downloaded the 1.7 version but for some reason when i set up prefrences it doesnt save them. can scan anything as a result. iv looked at the config file and its made the changes in there but it dosent seem to be reading them back. also tried running as admin but no luck.
never had this problem with previous versions
can someone help
The only situation I can think of that would cause this is when either the added folder, or a subfolder within in inaccessable to the program.
In this situation the user is informed of the offending folder and it is removed from the config. The situation that normally causes this is when people try to add drives to the program. Drives contain system folders which when accessed cause an exception (usually "System Volume Information")
The way to avoid this is to add subfolders and not the Drive.
The problem is in the following code
Code:
For f = 1 To realpathcount
tempstring = realpaths(f)
For Each subdir4 In Directory.GetDirectories(realpaths(f), "*", SearchOption.AllDirectories)
realpathcount = +1
realpaths(realpathcount) = subdir4
Next
Next
For f = 1 To realpathcount
Dim dir_info As New System.IO.DirectoryInfo(realpaths(f))
tempstring = realpaths(f)
Dim subdirs As New System.IO.DirectoryInfo(realpaths(f))
ListFiles(dirinfo, pattern, subdirs)
Next
The exception happens within the line
For Each subdir4 In Directory.GetDirectories(realpaths(f), "*", SearchOption.AllDirectories)
If it can't access any directory within the path then the exception is thrown and the each loop is exited.
If anyone knows a way to catch the exception but continue the rest of the loop then please let me know.