Fix file-not-found exception

This commit is contained in:
Flamefire committed 2013-10-18 21:29:43 +02:00
1 parent 4dd9f44f3d
commit 155718456c
1 file changed
+5 -3
+5 -3
View File
@@ -79,7 +79,7 @@ namespace VocaluxeLib
if (sr.EndOfStream) if (sr.EndOfStream)
break; break;
char chr = (char)sr.Read(); var chr = (char)sr.Read();
value += chr.ToString(); value += chr.ToString();
tmp = sr.Peek(); tmp = sr.Peek();
} }
@@ -141,8 +141,10 @@ namespace VocaluxeLib
public static List<string> ListFiles(string path, string cast, bool recursive = false, bool fullpath = false) public static List<string> ListFiles(string path, string cast, bool recursive = false, bool fullpath = false)
{ {
List<string> files = new List<string>(); var files = new List<string>();
DirectoryInfo dir = new DirectoryInfo(path); var dir = new DirectoryInfo(path);
if (!dir.Exists)
return files;
try try
{ {