Merge pull request #1 from Avebluha/feature/save-dir-fix
Fixed error when save directory does not exist
This commit is contained in:
@@ -854,7 +854,13 @@ namespace SlaveMatrix
|
|||||||
|
|
||||||
public static string[] SDPaths()
|
public static string[] SDPaths()
|
||||||
{
|
{
|
||||||
|
if (!Directory.Exists(SavePath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(SavePath);
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerable<string> source = Directory.EnumerateFiles(SavePath);
|
IEnumerable<string> source = Directory.EnumerateFiles(SavePath);
|
||||||
|
|
||||||
return new string[10]
|
return new string[10]
|
||||||
{
|
{
|
||||||
source.FirstOrDefault((string e) => e.StartsWith(Path.Combine(SavePath, "0: "))),
|
source.FirstOrDefault((string e) => e.StartsWith(Path.Combine(SavePath, "0: "))),
|
||||||
|
|||||||
Reference in New Issue
Block a user