Skip to content

Commit 8be33ff

Browse files
committed
Fix for directory not existing when getting all files
1 parent cf09e5e commit 8be33ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PackDB.FileSystem/OS/DirectoryProxy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class DirectoryProxy : IDirectory
88
{
99
public string[] GetFiles(string path, string fileExtension)
1010
{
11-
return Directory.GetFiles(path, "*." + fileExtension, SearchOption.TopDirectoryOnly);
11+
return Directory.Exists(path) ? Directory.GetFiles(path, "*." + fileExtension, SearchOption.TopDirectoryOnly) : new string[0];
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)