Bundler: Fix IOException trying to scan an invalid path.
This commit is contained in:
@@ -50,6 +50,12 @@ public class Bundler
|
||||
return _absoluteFiles;
|
||||
}
|
||||
|
||||
if (Directory.Exists(_absolutePath) == false)
|
||||
{
|
||||
_absoluteFiles = new List<string>();
|
||||
return _absoluteFiles;
|
||||
}
|
||||
|
||||
DirectoryInfo dir = new DirectoryInfo(_absolutePath);
|
||||
FileInfo[] files = dir.GetFiles();
|
||||
_absoluteFiles = files.OrderBy(file => file.FullName).Select(file2 => file2.FullName).ToList();
|
||||
|
||||
Reference in New Issue
Block a user